Disable API docs that display very much broken due to missing request/response typing.
This commit is contained in:
@@ -25,7 +25,7 @@ from paskia.util import (
|
||||
)
|
||||
from paskia.util.hostutil import normalize_host
|
||||
|
||||
app = FastAPI()
|
||||
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
|
||||
|
||||
|
||||
def is_global_admin(ctx) -> bool:
|
||||
|
||||
@@ -26,7 +26,7 @@ from paskia.util import hostutil, htmlutil, passphrase, userinfo, vitedev
|
||||
|
||||
bearer_auth = HTTPBearer(auto_error=True)
|
||||
|
||||
app = FastAPI()
|
||||
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
|
||||
|
||||
app.mount("/user", user.app)
|
||||
|
||||
|
||||
@@ -59,7 +59,13 @@ async def lifespan(app: FastAPI): # pragma: no cover - startup path
|
||||
await stop_background()
|
||||
|
||||
|
||||
app = FastAPI(lifespan=lifespan, redirect_slashes=False)
|
||||
app = FastAPI(
|
||||
lifespan=lifespan,
|
||||
redirect_slashes=False,
|
||||
docs_url=None,
|
||||
redoc_url=None,
|
||||
openapi_url=None,
|
||||
)
|
||||
|
||||
# Apply redirections to auth-host if configured (deny access to restricted endpoints, remove /auth/)
|
||||
app.middleware("http")(auth_host.redirect_middleware)
|
||||
|
||||
@@ -23,7 +23,7 @@ from paskia.fastapi.wsutil import validate_origin, websocket_error_handler
|
||||
from paskia.util import hostutil, passphrase, pow, useragent
|
||||
|
||||
# Create a FastAPI subapp for remote auth WebSocket endpoints
|
||||
app = FastAPI()
|
||||
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
|
||||
|
||||
|
||||
@app.websocket("/request")
|
||||
|
||||
@@ -19,7 +19,7 @@ from paskia.fastapi import authz, session
|
||||
from paskia.fastapi.session import AUTH_COOKIE
|
||||
from paskia.util import hostutil, passphrase
|
||||
|
||||
app = FastAPI()
|
||||
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
|
||||
|
||||
|
||||
@app.exception_handler(authz.AuthException)
|
||||
|
||||
@@ -10,7 +10,7 @@ from paskia.globals import passkey
|
||||
from paskia.util import hostutil, passphrase
|
||||
|
||||
# Create a FastAPI subapp for WebSocket endpoints
|
||||
app = FastAPI()
|
||||
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
|
||||
|
||||
# Mount the remote auth WebSocket endpoints
|
||||
app.mount("/remote-auth", remote.app)
|
||||
|
||||
Reference in New Issue
Block a user