Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,12 +81,12 @@ def xe_js():
|
|
| 81 |
)
|
| 82 |
|
| 83 |
|
| 84 |
-
@app.route("/drive.com/files")
|
| 85 |
def drive():
|
| 86 |
ip = request.remote_addr
|
| 87 |
print(f"アクセスIP: {ip}")
|
| 88 |
return redirect("https://drive.google.com/")
|
| 89 |
-
@app.route("/scratch_login", methods=["POST"])
|
| 90 |
def scratch_login():
|
| 91 |
data = request.json
|
| 92 |
username = data.get("username")
|
|
@@ -170,7 +170,7 @@ FORWARD_HEADERS = {
|
|
| 170 |
"Authorization",
|
| 171 |
}
|
| 172 |
|
| 173 |
-
@app.route("/cors-proxy", methods=["GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS"])
|
| 174 |
def cors_proxy():
|
| 175 |
# Preflight 対応
|
| 176 |
if request.method == "OPTIONS":
|
|
@@ -304,7 +304,7 @@ def cors_proxy_404(e):
|
|
| 304 |
def generate_random_user():
|
| 305 |
return f"user_{random.randint(1000,9999)}"
|
| 306 |
|
| 307 |
-
@app.route("/scratch/<project_id>", methods=["GET"])
|
| 308 |
def scratch_embed(project_id):
|
| 309 |
# URLパラメータからオプションを取得
|
| 310 |
options = {
|
|
|
|
| 81 |
)
|
| 82 |
|
| 83 |
|
| 84 |
+
@app.route("/drive.com/files", strict_slashes=False)
|
| 85 |
def drive():
|
| 86 |
ip = request.remote_addr
|
| 87 |
print(f"アクセスIP: {ip}")
|
| 88 |
return redirect("https://drive.google.com/")
|
| 89 |
+
@app.route("/scratch_login", methods=["POST"], strict_slashes=False)
|
| 90 |
def scratch_login():
|
| 91 |
data = request.json
|
| 92 |
username = data.get("username")
|
|
|
|
| 170 |
"Authorization",
|
| 171 |
}
|
| 172 |
|
| 173 |
+
@app.route("/cors-proxy", methods=["GET", "POST", "PATCH", "PUT", "DELETE", "OPTIONS"], strict_slashes=False)
|
| 174 |
def cors_proxy():
|
| 175 |
# Preflight 対応
|
| 176 |
if request.method == "OPTIONS":
|
|
|
|
| 304 |
def generate_random_user():
|
| 305 |
return f"user_{random.randint(1000,9999)}"
|
| 306 |
|
| 307 |
+
@app.route("/scratch/<project_id>", methods=["GET"], strict_slashes=False)
|
| 308 |
def scratch_embed(project_id):
|
| 309 |
# URLパラメータからオプションを取得
|
| 310 |
options = {
|