AlfrescoArchive / activiti-cloud-charts

Helm Charts for Activiti cloud Apps
Apache License 2.0
29 stars 28 forks source link

Keycloak not compatitible with Firefox due to incorrect corf headers #74

Open LeoQuote opened 5 years ago

LeoQuote commented 5 years ago

Firefox only support for the header format as follow:

Access-Control-Allow-Methods: <method>, <method>, ...
Access-Control-Allow-Headers: <header-name>, <header-name>, ...

notice there's no double quotes around the values, but the ingress definition for keycloak added the header with two double quotes around the header , like : https://github.com/Activiti/activiti-cloud-charts/blob/master/activiti-keycloak/values.yaml

      more_set_headers 'Access-Control-Allow-Methods: "POST, GET, OPTIONS, PUT, PATCH, DELETE"';
      more_set_headers 'Access-Control-Allow-Headers: "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,authorization"';

this will Firefox raise an exception saying POST method is not in Access-Control-Allow-Methods when posting a form to keycloak. deleting these quotes can fix the problem. #73

reference link: https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Access-Control-Allow-Headers https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Access-Control-Allow-Methods