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

Needed to add content type to run in Chrome #4

Open
RomSocial opened this issue Oct 1, 2014 · 0 comments
Open

Needed to add content type to run in Chrome #4

RomSocial opened this issue Oct 1, 2014 · 0 comments

Comments

@RomSocial
Copy link

Hi,

I would like to note that Chrome, running twitterwall by @remy complained about content type, so needed to add a line for it in server.js:

app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header("Access-Control-Allow-Headers", "X-Requested-With");
res.header('Content-Type', 'application/javascript');
if (req.method === 'OPTIONS') return res.send(200);
next();
});

Otherwis works great!

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

No branches or pull requests

1 participant