Spaces:
Running
Running
cutycat2000x
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,14 @@
|
|
1 |
from flask import Flask, request, Response
|
|
|
2 |
|
3 |
app = Flask("DiscordRocks Instant Chat Proxy")
|
4 |
|
5 |
DISCORD_ROCKS_HOST = 'chat.discord.rocks'
|
6 |
CHAT_UI_HOST = 'cutycat2000x-instantchat.static.hf.space'
|
7 |
|
|
|
8 |
@app.route("/<path:path>", methods=['GET', 'POST'])
|
9 |
-
def handle_request(path):
|
10 |
chat_ui_url = f'https://{DISCORD_ROCKS_HOST}/{path}'
|
11 |
response = Response()
|
12 |
response.status_code = 200
|
|
|
1 |
from flask import Flask, request, Response
|
2 |
+
import requests
|
3 |
|
4 |
app = Flask("DiscordRocks Instant Chat Proxy")
|
5 |
|
6 |
DISCORD_ROCKS_HOST = 'chat.discord.rocks'
|
7 |
CHAT_UI_HOST = 'cutycat2000x-instantchat.static.hf.space'
|
8 |
|
9 |
+
@app.route('/',methods=['GET', 'POST'])
|
10 |
@app.route("/<path:path>", methods=['GET', 'POST'])
|
11 |
+
def handle_request(path=""):
|
12 |
chat_ui_url = f'https://{DISCORD_ROCKS_HOST}/{path}'
|
13 |
response = Response()
|
14 |
response.status_code = 200
|