Skip to content

Missing Content-Type header #78

@mhluska

Description

@mhluska

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 needs to call .type('text/html') somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions