Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,9 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
-
from fastapi
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
-
# This
|
| 7 |
-
@app.
|
| 8 |
-
def
|
| 9 |
-
return {"
|
| 10 |
-
|
| 11 |
-
@app.get("/")
|
| 12 |
-
def root():
|
| 13 |
-
return {"message": "VPS is running. Use sshx to connect."}
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
+
from fastapi import Request
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
+
# This handles GET, HEAD, and everything else
|
| 7 |
+
@app.api_route("/", methods=["GET", "HEAD"])
|
| 8 |
+
def root(request: Request):
|
| 9 |
+
return {"message": "VPS is active", "method": request.method}
|
|
|
|
|
|
|
|
|
|
|
|