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

Send correct content type for JavaScript files. #54

Conversation

markuspoerschke
Copy link

The JavaScript files should be send with the correct content type header. Otherwise the browser might show a warning in th console:

grafik

@markuspoerschke markuspoerschke force-pushed the bugfix/send-tracker-js-content-type branch from 2464019 to f552864 Compare October 16, 2019 20:04
@electerious
Copy link
Owner

The tests are failing. It seems that setHeader is not a function in that case:

TypeError: Cannot read property 'setHeader' of undefined 

@electerious
Copy link
Owner

The routes will be pre-executed when in production mode. req and res don't exist in this case. I might need to rewrite the preload function to allow custom headers. This is also necessary to serve a favicon with the correct content-type: #38

electerious added a commit that referenced this pull request Oct 20, 2019
@electerious
Copy link
Owner

Implemented: 3f11e09

@markuspoerschke markuspoerschke deleted the bugfix/send-tracker-js-content-type branch October 20, 2019 13:18
@electerious electerious mentioned this pull request Nov 5, 2019
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

Successfully merging this pull request may close these issues.

2 participants