-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ktor v3.1.1 broke staticFiles index #4706
Comments
Unfortunately, I cannot reproduce the problem by making a embeddedServer(Netty, port = 8080) {
routing {
staticFiles(remotePath = "/", dir = File("static"), index = "index.html")
}
}.start(wait = true) Here is the file structure:
Please share a code snippet to reproduce the bug. |
The code snippet is pretty much what you have tried but the context might be different: ![]() curl -v http://localhost:1180/ # gives me a 404 Below is my HUtils.kt prelude:
My
|
Can you please share the complete |
@Stexxe thanks for essentially helping me to debug my callee code. I had a lot of routing implementation and commented them out one by one...
...was the culprit which was basically a catch-all for all GET requests. It turns out it was not working as expected in the past and the latest update just made the the issue visible. Removing the "catch-all" GET implementation
...fixed the issue. The |
staticFiles(remotePath = "/", dir = File("static"), index = "index.html")
// worked in Ktor v3.1.0 and does not work in Ktor v3.1.1Instead of the index.html I get a 404 for
/
now.The text was updated successfully, but these errors were encountered: