19 lines
788 B
Diff
19 lines
788 B
Diff
--- routes/api.py
|
|
+++ routes/api.py
|
|
@@ -58,15 +58,6 @@
|
|
def before_api_request():
|
|
"""Before request handler for API routes."""
|
|
- # Set CORS headers for API routes
|
|
- if current_app.config.get('ENABLE_CORS', True):
|
|
- response = current_app.make_default_options_response()
|
|
- response.headers['Access-Control-Allow-Origin'] = '*'
|
|
- response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, DELETE, OPTIONS'
|
|
- response.headers['Access-Control-Allow-Headers'] = 'Content-Type, Authorization, X-Public-Key, X-Request-ID'
|
|
-
|
|
# Handle OPTIONS requests
|
|
if request.method == 'OPTIONS':
|
|
- return response
|
|
+ return current_app.make_default_options_response()
|
|
|
|
# Skip authentication for status endpoint and options requests
|