Provide user info in Remote-* headers. Caddy configuration improved.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import logging
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
from fastapi import Body, Cookie, FastAPI, HTTPException, Request
|
||||
from fastapi.responses import FileResponse, JSONResponse, RedirectResponse
|
||||
from fastapi import Body, Cookie, FastAPI, HTTPException
|
||||
from fastapi.responses import FileResponse, JSONResponse
|
||||
|
||||
from ..authsession import expires
|
||||
from ..globals import db
|
||||
@@ -24,12 +24,6 @@ async def general_exception_handler(_request, exc: Exception):
|
||||
return JSONResponse(status_code=500, content={"detail": "Internal server error"})
|
||||
|
||||
|
||||
@app.get("")
|
||||
def adminapp_slashmissing(request: Request):
|
||||
print("HERE")
|
||||
return RedirectResponse(url=request.url_for("adminapp"))
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def adminapp(auth=Cookie(None)):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user