Browse Source

CORS 3

10.0
Maciej Wawro 5 years ago
parent
commit
bf9caf305f
  1. 2
      galicea_openid_connect/__manifest__.py
  2. 1
      galicea_openid_connect/api.py

2
galicea_openid_connect/__manifest__.py

@ -9,7 +9,7 @@
'website': "http://galicea.pl", 'website': "http://galicea.pl",
'category': 'Technical Settings', 'category': 'Technical Settings',
'version': '10.0.1.2',
'version': '10.0.1.3',
'depends': ['web', 'galicea_environment_checkup'], 'depends': ['web', 'galicea_environment_checkup'],

1
galicea_openid_connect/api.py

@ -33,6 +33,7 @@ def resource(path, method, auth='user', clients=None):
'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, X-Debug-Mode, Authorization', 'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, X-Debug-Mode, Authorization',
'Access-Control-Max-Age': 60 * 60 * 24, 'Access-Control-Max-Age': 60 * 60 * 24,
'Access-Control-Allow-Methods': 'OPTIONS, HEAD, GET, POST, PUT, DELETE'
} }
if req.httprequest.method == 'OPTIONS': if req.httprequest.method == 'OPTIONS':
return http.Response( return http.Response(

Loading…
Cancel
Save