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

Is it possible to configure the mime type returned by grunt-contrib-connect? #243

Open
stefany-newman opened this issue Jul 30, 2018 · 1 comment

Comments

@stefany-newman
Copy link

I need to serve files without extensions as text/html

@stefany-newman
Copy link
Author

SOLUTION:

 options: {
    port: 8800,
    hostname: 'localhost',
        middleware: function(connect, options, middlewares) {
                    middlewares.unshift(function(req, res, next) {
                        res.setHeader('Content-Type', 'text/html');
                        return next();
                    });

                    return middlewares;
                },
  }

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