Downloads index.html instead of serving it
See original GitHub issueSteps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.
http-server ./dist
What did you expect to happen?
I expected to see rendered ./dist/index.html
web page in the browser.
BUT instead browser opens save file dialog.
If the issue is a feature request, what is the motivation / use case for it?
Tell us about your environment
- exact http-server version: ^0.12.3
- Node version: 12.16.3
- Platform: Windows 10, Chrome 86.0.4240.75 (Official Build) (64-bit)
Other information (related issues, suggestions for a fix, etc):
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Amazon S3 downloads index.html instead of serving
I've been through the same issue and I have resolved this way. At S3 Bucket, click o index.html checkbox, click con Actions tab,...
Read more >Amazon S3 downloads index.html instead of serving - iTecNote
The answer is to gzip the CSS and JavaScript files. Yes, you read that right. gzip -9 production.min.css. This will produce production.min.css ...
Read more >My website downloads the index file instead of opening my ...
My website downloads the index file instead of opening my content. This happens when the .htaccess file for your website contains an invalid...
Read more >Solved: Chrome downloading file instead of displaying page
The answer is simple: you visited your unfinished site in Chrome before it was configured correctly. Chrome correctly just downloaded your front ...
Read more >Apache downloading html files instead of serving them, php ...
Your browser doesn't know how to display application/x-httpd-php ; it knows how to display text/html . You need to send the correct mime...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had this issue when I searched localhost:8080
Issue gone when I searched localhost:8080/index.html
Try http://127.0.0.1:8080/index.html in windows