Comments (8)
archive.luftdaten.info is only a nginx server and not the same server/application as feinstaub-api.
from feinstaub-api.
The blocking header is set by github.com.
The header Content-Security-Policy restricts the resources you can include. It should be possible to load the data files if your page is hosted on a server not sending this header.
Or if you can configure this header in this server.
Rajko
Am 24. März 2016 22:04:35 MEZ, schrieb "André Jaenisch" [email protected]:
Steps to reproduce (for example, from github.com):
jQuery.get("http://archive.luftdaten.info/2015-10-01/2015-10-01_ppd42ns_sensor_27.csv").then(function(response) { console.log("response", response); }); Object { state: .Deferred/r.state(), always: .Deferred/r.always(), then: .Deferred/r.then(), promise: .Deferred/r.promise(), pipe: .Deferred/r.then(), done: Q.Callbacks/f.add(), fail: Q.Callbacks/f.add(), progress: Q.Callbacks/f.add() } Content Security Policy: The page's settings blocked the loading of a resource at http://archive.luftdaten.info/2015-10-01/2015-10-01_ppd42ns_sensor_27.csv ("connect-src https://github.com https://uploads.github.com https://status.github.com https://api.github.com https://www.google-analytics.com https://github-cloud.s3.amazonaws.com https://api.braintreegateway.com https://client-analytics.braintreegateway.com wss://live.github.com").Albeit this is CSP, it would be handy to have a way to request the data
via XHR (aka "Ajax").
Therefore
CORS
must be enabled. This way I could write a client-side only JavaScript
application which pulls the data in. JSONP would be fine, too.As far as I understood
CSP
you would need to declare a website which is allowed access to
http://archive.luftdaten.info/2015-10-01/2015-10-01_ppd42ns_sensor_27.csv.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#6
from feinstaub-api.
@mfa Is there a way to access those archive data through the feinstaub-API? (If possible, even anonymous)
from feinstaub-api.
@Ryuno-Ki nope, currently not as the data is generated on a dedicated server (archive.luftdaten.info) from a nightly db dump. The main API does not have to do anything with it (besides providing the dump)
from feinstaub-api.
@asmaps Can you point me to where the API provides the dump?
from feinstaub-api.
It's not public as its a raw Postgres dump containing hashed passwords, session keys etc. It's generated with a cronjob and copied with scp to @mfa 's server
from feinstaub-api.
but I think you should be able to access the data as json via the /data endpoint for the public sensors ( https://api.luftdaten.info/v1/data/ ). It's not those csv files then, but should be the same data afaik.
from feinstaub-api.
Looks good. Thanks!
from feinstaub-api.
Related Issues (13)
- geoJson-Field zu Location hinzufügen HOT 1
- Use barometric pressure and GPS data to calculate the elevation of the sensor HOT 2
- API Usability HOT 5
- Home Assistant User Agents are getting blocked - Unable to query own data HOT 8
- option to get an email, if sensor is not responding for (i.e.) 5 minutes HOT 1
- archive.luftdaten.info: Timestamp in UTC oder UTC+1/MEZ? HOT 1
- lots of missing data in the CSV-files on http://archive.luftdaten.info HOT 5
- Extremely slow respons of the hosted API HOT 1
- purge sensordata datasets without any sensordatavalues. HOT 1
- Create endpoint containing list of sensors HOT 1
- [RFC] Create endpoint for loading aggregated sensor data
- Security of the post API HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feinstaub-api.