Skip to content

Plug.Static is too sensitive for different paths writing #118

@rssdev10

Description

@rssdev10

Plug.Static is not providing proper errors.

using Bukdu

routes() do
    # correct way
    plug(Plug.Static, at="/static", from=normpath(joinpath(pwd(),".")))

    # wrong - not able to read from subdirs but able to get from current directory only
    # error in "from" value. For any requested file from subdir, the error 404 is generated.
    plug(Plug.Static, at="/static2", from=pwd())


    # eating symbols from the file name
    # double slash in front of "at"-value gives an exception as a result
    plug(Plug.Static, at="//static3", from=pwd())
end

Bukdu.start(8080)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions