ember-fastboot / ember-fastboot/fastboot-app-server

Missing Content-Type header

Open
#78 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
140
Forks
70
PR merge metrics
No merged PRs in 30d

Description

The initial response for the html page is missing `Content-Type: text/html; charset=utf-8`.

I think the reason this is happening is `express-http-server.js` has the following code:

```
52 if (this.distPath) {
53 app.get('/', fastbootMiddleware);
54 app.use(express.static(this.distPath));
55 app.get('/assets/*', function(req, res) {
56 res.sendStatus(404);
57 });
58 }
```

`app.get('/', fastbootMiddleware);` causes the initial request to not have the correct content-type since that is normally handled by `express.static`.

So it seems [fastboot-express-middleware](https://github.com/ember-fastboot/fastboot-express-middleware) needs to call `.type('text/html')` somewhere.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.