Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Data Tables not displaying data in Safari #462

Closed
onezerojeremy opened this issue Aug 12, 2015 · 0 comments
Closed

Data Tables not displaying data in Safari #462

onezerojeremy opened this issue Aug 12, 2015 · 0 comments
Labels

Comments

@onezerojeremy
Copy link

https://fec-dev-web.18f.gov/candidates?cycle=2012&cycle=2014&cycle=2016

openfec datatable

Tried on :
Version 7.1.5 (9537.85.14.17)
Version 8.0.7 (10600.7.12)

[Error] XMLHttpRequest cannot load https://fec-dev-api.18f.gov/v1/candidates/?per_page=30&page=1&api_key=&cycle=2012&cycle=2014&cycle=2016&sort_hide_null=true&sort=name. Request header field Accept-Encoding is not allowed by Access-Control-Allow-Headers. (candidates, line 0)
h/t to Noah for digging into the js errors.

jmcarp added a commit to jmcarp/openFEC that referenced this issue Aug 12, 2015
The API currently uses the `Access-Control-Allow-Origin` header, but not
the `Access-Control-Allow-Headers` header. This leads to CORS errors
when using Safari, which sends the `Accept-Encoding` header with its
`OPTIONS` requests. Rather than allowing the `Accept-Encoding` header,
this patch switches to Flask-CORS for CORS configuration, which has
better defaults and is easier to configure than settings CORS headers
manually.

[Resolves fecgov/openFEC-web-app#462]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant