mozilla / firefox-hardware-report

The Firefox Hardware Report was the precursor to the Firefox Public Data Report, to which it now redirects
https://data.firefox.com/dashboard/hardware
28 stars 13 forks source link

cors error when accessing the domain from its sub-domain ( no error in chrome and safari only in firefox) #68

Closed pawansaket closed 6 years ago

pawansaket commented 6 years ago

I have a problem with firefox for its CORS policy. As, I have a domain and created a sub-domain for it. Now want to access domain from sub-domain I got cors errors ( app is on nodejs+expressjs+angularjs) ( only in firefox). Here is the code for CORS setting in nodejs:

var allowHeaders = ['Accept', 'Accept-Version', 'Content-Type', 'Api-Version', 'Origin', 'X-Requested-With', 'api-token'];

  res.header('Access-Control-Allow-Credentials', true);
   res.header('Access-Control-Allow-Headers', allowHeaders.join(', '));
   res.header('Access-Control-Allow-Methods', res.methods.join(', ')); // method is PUT,GET,OPTIONS
   res.header('Access-Control-Allow-Origin', origin);
   res.header("X-Frame-Options", "SAMEORIGIN");
   res.header('X-XSS-Protection', '1; mode=block');
   res.header('x-content-type-options', 'nosniff');
   return res.send(204);

firefox-cors

openjck commented 6 years ago

Hi @pawansaket. This is the GitHub repo for the Firefox Hardware Report website. If you're still having this issue, please see this page about where to go for developer support.