Browse Source

[openid_connect] Fix CORS

v12_initial_fix
Maciej Wawro 5 years ago
parent
commit
e8667d4347
  1. 2
      galicea_openid_connect/api.py
  2. 2
      galicea_openid_connect/controllers/main.py

2
galicea_openid_connect/api.py

@ -20,7 +20,7 @@ def resource(path, method, auth='user'):
assert auth in ['user', 'client']
def endpoint_decorator(func):
@http.route(path, auth='public', type='http', methods=[method], csrf=False)
@http.route(path, auth='public', type='http', methods=[method, 'OPTIONS'], csrf=False, cors='*')
@wraps(func)
def func_wrapper(self, req, **query):
try:

2
galicea_openid_connect/controllers/main.py

@ -246,7 +246,7 @@ class Main(http.Controller):
return self.__redirect(redirect_uri, response_params, response_mode)
@http.route('/oauth/token', auth='public', type='http', methods=['POST'], csrf=False)
@http.route('/oauth/token', auth='public', type='http', methods=['POST', 'OPTIONS'], csrf=False, cors='*')
def token(self, req, **query):
try:
if 'grant_type' not in query:

Loading…
Cancel
Save