Open pedromorgan opened 7 years ago
FIY here's the nginx config after the "domain" ip address is correct.. which is also a problem we solve soon
# make theo+geoff happy ;-)
server {
# The server names and port
server_name crossfeed-logs.freeflightsim.org cflogs.geoffair.info;
listen 80;
# The root directory for this domain and files etc
root /home/geoff/fg/crossfeed-dailies/csv/;
## We disable index, and autoindex so we can get a life
# index index.php index.html index.htm;
location / {
autoindex on;
}
}
@pedromorgan I see the files when I go to http://crossfeed-logs.freeflightsim.org
All looks good. Nice stuff!
But I cannot access them via an xmlhttprequest. Looks like the folder is not CORS-enabled.
Could you add a one-line .htaccess file to the folder:
Header set Access-Control-Allow-Origin "*"
See: http://enable-cors.org/server_apache.html
Also, it would be great to have a log file, so that the JavaScript can get a list of the available titles
OOps and sorry test it now..
Were nginx btw.. apache is not running really much now..
Complain back back..
# make theo+geoff happy ;-)
server {
# The server names and port
server_name crossfeed-logs.freeflightsim.org cflogs.geoffair.info;
listen 80;
# The root directory for this domain and files etc
root /home/geoff/fg/crossfeed-dailies/csv/;
## We disable index, and autoindex so we can get a life
# index index.php index.html index.htm;
location / {
autoindex on;
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Conte$
}
}
}
Signal from freeFlightSim coming in loud and clear
Not yet reading the log, but will do so in the near future
BTW
Just thinking out loud: if the CSV files and log file were in JSON format then we would not need the CORS support
@theo-armour Cross-origin resource sharing is to do with header filesm and client/server releationship, whatever the file format, https://en.wikipedia.org/wiki/Cross-origin_resource_sharing
Are u accessing files ok with browser application ??
@theo-armour = @geoffmcl
This is where life gets daft online...
Thats why CORS is in there, to stop spoofing, and to have no other domains allowinf access.. such as your home machine.. But hey lets switch it on online and have fun..
As per @theo-armour request, here are the raw logs...
Where does this come from... ?? Well sorry @geoffmcl its readonly from your dir..
So there is the "stuff" and delivered by nginx online to your hearts
content