-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
StaticWeb map static path can't include "index.html" ? #719
Comments
Hello @yunhor Could you please provide us a code-snippet that produces this type of result? Update:
We have the If you're serving the whole website from static assets (i.e view managed by react,angular...) use assetHandler := app.StaticHandler("./static", false, false)
app.SPA(assetHandler) Examples can be found here: https://github.com/kataras/iris/tree/master/_examples/file-server/single-page-application Update 2: However I did some digging to a relative situation and I found a minor issue. Update 3: I found the origin of the (Update2) issue and I've fixed that but I have no time to test it much more right now, I'm in the office. I want to be 100% sure that we will not face an issue like that on the near future and I'll push the fix to the repository when I go back to my house. Wait for that fix, which solves the issue of Thank you,
|
Thank you @kataras ,I will try SPA method. |
I found the origin of the issue and I've fixed that but I have no time to test it much more right now, I'm in the office. I want to be 100% sure that we will not face an issue like that on the near future and I'll push the fix to the repository when I go back to my house. Wait for that fix, which solves the issue of StaticWeb you described on this thread. |
Done, upgrade with @yunhor Thank you very much for your report, it lead me to fix an important issue we had in my mind for a long time. Please star or watch the repository to receive real-time updates. |
I just run iris-master/_examples/file-server/basic/main.go All the following gives "Not Found" If I rename index.html to i.html, then |
@jolee11 this happens because /static/ redirects to /static and index.html is not part of the /static but /static/index.html. The /static/ or /static/index.html will redirect to /static and that was expected as go docs of the So you have two options,
|
Thank you very much! |
… for good Former-commit-id: 75b855bee9216c28ce8e1ff46aee467766c37f23
Documentation for the iris project can be found at
https://github.com/kataras/iris#-learn.
iris version 8.2.4
When I use StaticWeb method map a static path, and request "static/index.html" ,it will "Not Found".
But when I change index.html to go.html ,it work .
I am sure the old iris hasn't this error .
The text was updated successfully, but these errors were encountered: