GeoNet / fits

Field Time Series
Apache License 2.0
4 stars 13 forks source link

FITS API CORS header #206

Closed junghao closed 2 years ago

junghao commented 2 years ago

Florent from Volcano Dashboard project is having issue while adding FITS data chart to Grafana:

from origin 'http://kaizen.gns.cri.nz:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
junghao commented 2 years ago

Updated FITS-API

$ curl --head "http://fits.geonet.org.nz/observation?typeID=e&siteID=HOLD"
HTTP/1.1 200 OK
Content-Type: text/csv;version=1
Access-Control-Allow-Methods: GET
Access-Control-Allow-Origin: *
Content-Disposition: attachment; filename="FITS-HOLD-e.csv"
Content-Security-Policy: connect-src 'self' https://*.geonet.org.nz https://www.google-analytics.com https://stats.g.doubleclick.net; form-action 'self'; frame-ancestors 'self'; object-src 'none'; img-src 'self' *.geonet.org.nz data: https://www.google-analytics.com https://stats.g.doubleclick.net; font-src 'self' https://fonts.gstatic.com; style-src 'self'; script-src 'self'; frame-src 'self' https://www.youtube.com https://www.google.com; base-uri 'none'; default-src 'none';
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Content-Length: 249541
Accept-Ranges: bytes
Date: Mon, 27 Jun 2022 04:08:27 GMT
Age: 14
Connection: keep-alive
Vary: Accept, Accept-Encoding