Spaces:
Running
Running
from flask import Flask, request, Response | |
app = Flask("DiscordRocks Instant Chat Proxy") | |
DISCORD_ROCKS_HOST = 'chat.discord.rocks' | |
CHAT_UI_HOST = 'cutycat2000x-instantchat.static.hf.space' | |
def handle_request(path): | |
chat_ui_url = f'https://{DISCORD_ROCKS_HOST}/{path}' | |
response = Response() | |
response.status_code = 200 | |
response.content_type = "text/html" | |
response.data = requests.get(chat_ui_url).content | |
return response | |
if __name__ == "__main__": | |
app.run(debug=True, host="0.0.0.0", port=7860) | |