Add new env variable to use prefixes in url [release-patch] #8

Merged
WorldTeacher merged 2 commits from dev into main 2025-11-25 09:57:16 +00:00
Showing only changes of commit e0988cf23b - Show all commits

View File

@@ -10,8 +10,6 @@ from fastapi import FastAPI, Query
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse
app = FastAPI(title="Signature Validation API")
# Optional path prefix support: when behind a reverse-proxy that uses a
@@ -35,6 +33,7 @@ async def _strip_api_prefix(request, call_next):
request.scope["root_path"] = api_prefix
return await call_next(request)
# Allow PHP application to call this API
app.add_middleware(
CORSMiddleware,