Add new frontend - fix 16
This commit is contained in:
@@ -14,6 +14,19 @@ async def proxy_nominatim_search(request: Request):
|
||||
"""
|
||||
Proxies requests to the Nominatim geocoding search API.
|
||||
"""
|
||||
# Handle OPTIONS requests directly for CORS
|
||||
if request.method == "OPTIONS":
|
||||
return Response(
|
||||
status_code=200,
|
||||
headers={
|
||||
"Access-Control-Allow-Origin": settings.CORS_ORIGINS_LIST,
|
||||
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
||||
"Access-Control-Allow-Headers": "Content-Type, Authorization, X-Tenant-ID",
|
||||
"Access-Control-Allow-Credentials": "true",
|
||||
"Access-Control-Max-Age": "86400" # Cache preflight for 24 hours
|
||||
}
|
||||
)
|
||||
|
||||
try:
|
||||
# Construct the internal Nominatim URL
|
||||
# All query parameters from the client request are forwarded
|
||||
|
||||
Reference in New Issue
Block a user