-
Notifications
You must be signed in to change notification settings - Fork 693
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
Pages with .html respond with 301 Moved Permanently causing service workers to fail. #565
Comments
The same thing happens to me for an $ curl -i localhost:5000/argh.html
HTTP/1.1 301 Moved Permanently
Location: /argh
Date: Wed, 13 Nov 2019 22:30:10 GMT
Connection: keep-alive
Transfer-Encoding: chunked If this is an intentional default, I think this tool has become too opinionated. |
I was just about to put in an issue but this seems like it might be related: I've noticed that when I use I haven't used a tool like Curl to examine the response and see if I'm getting a |
Hey @uchilaka can you provide a full directory structure (or at least the immediate parent and siblings list) of that specific component file you are mentioning. |
@uchilaka As the same, I also have a project having PdfJs and build the source with vue-cli but the pdfjs viewer is a static html file(viewer.html). The problem is that when I access to the static html file (ex. viewer.html) through 'serve' like 'localhost:8080/assets/pdfjs/viewer.html', the extnsion '.html' is missing - redirected to 'localhost:8080/assets/pdfjs/viewer' and it shows the page.
|
I'm having the same problem. When trying to access a HTML file at |
Hasn't there been a solution yet ? |
It seems like a conscious design choice, so I think someone has to fork the tool and remove the feature, or PR a |
Sorry for my late response. I gave up keeping using 'serve' because of this feature in the project in which requires opening self host files. |
hahaha, me too, gave up and wrote the custom script |
I've just published a fork called |
for anyone stumbling upon this issue, using a {
"cleanUrls": false
} seems to do the trick and stops redirecting see #404 (nice issue number btw 😄 ) |
this did the trick for me, tks! make sure |
If a page is requested that has .html at the end then the response is a 301 Moved Permanently. And if this is stored in cache with the help of a service worker then reading it from cache on subsequent fetch event with cache.match() doesnt work as Chrome throws following error
The FetchEvent for "http://localhost:5000/modules/tester.html" resulted in a network error response: a redirected response was used for a request whose redirect mode is not "follow".
The text was updated successfully, but these errors were encountered: