Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http://crossfeed-logs.freeflightsim.org/ #8

Open
pedromorgan opened this issue Aug 17, 2016 · 6 comments
Open

http://crossfeed-logs.freeflightsim.org/ #8

pedromorgan opened this issue Aug 17, 2016 · 6 comments

Comments

@pedromorgan
Copy link
Member

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

@pedromorgan
Copy link
Member Author

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;        
    }
}

@theo-armour
Copy link
Member

@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

@pedromorgan
Copy link
Member Author

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$
        }
    }
}

@theo-armour
Copy link
Member

Globe Crossfeed Replay FFS

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

@pedromorgan
Copy link
Member Author

@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 ??

@pedromorgan
Copy link
Member Author

@theo-armour = @geoffmcl

This is where life gets daft online...

  • On a browser u can NAVIGATE on browser get a file eg http://cfday.fffs/foo-222-33-44.cvs
  • with wget it works also.. as its a htto header..
  • If your in a "domain" in our case FreeFlightSim.org.. then we Do or Dont want other domains to access resources///

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants