kataras / kataras/iris

[HELP] use app.HandleDir to create static web server

Open
#1,803 3 comments 0 reactions 1 assignee Claimed by @kataras View on GitHub
💡type:idea
Dominant language
Go
Stars
25.6k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

When I use
`
app.HandleDir("/static", iris.Dir("./static"))
`
to create a static server.

Access " http://xxx/static/doc/index.html " will redirect to "http://xxx/static/doc",

the "http://xxx/static/doc" path be identified as a file not a dir.

In the index.html resource "" request "http://xxx/static/css/style.css" not "http://xxx/static/doc/css/style.css"

how to resolve? Thank you very much!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.