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

dev-http server with 'classpath:foo' config no longer defaults to index.html #1064

Closed
henryw374 opened this issue Nov 16, 2022 · 4 comments
Closed

Comments

@henryw374
Copy link

I just upgraded to 2.20.10 and now I have to manually add 'index.html' to the url

@henryw374
Copy link
Author

Cheers!

@henryw374
Copy link
Author

Hi. I just had a go with this and it is still not quite right. Given classpath:foo I can visit http://host:port and it will default to index.html in foo.

but, if I go to http://host:port/bar it resolves index.html from foo, not foo/bar. I have to type in http://host:port/bar/index.html to get the foo/bar index.html file

@thheller
Copy link
Owner

Hmm so this is sort of how its meant to work. Since the assumption is that the client does the "routing" internally, ie. page rendered by JS. So, whenever the request at the handler it just checks the root for an index.html and serves that.

Didn't think people used any actual nested index.html files.

You can get the old behavior back by setting :dev-http {1234 {:root "classpath:foo" :use-index-files true}} instead of just :dev-http {1234 "classpath:foo"}.

@henryw374
Copy link
Author

Thanks I tried use-index-files and couldn't get it to work. This is on 2.20.12. I also searched the shadow code base for that in case I am doing something wrong, but I couldn't find any reference to use-index-files .

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

2 participants