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

Static middleware changed behaviour? #1400

Open
ghost opened this issue Sep 18, 2019 · 1 comment
Open

Static middleware changed behaviour? #1400

ghost opened this issue Sep 18, 2019 · 1 comment

Comments

@ghost
Copy link

@ghost ghost commented Sep 18, 2019

Issue Description

I updated echo in one of my projects. After that my static configuration didn't work without changes. Before it automatically resolved to an existing index.html. After that I had to point to that file.

My code was something like that:

docsGroup := e.Group("")
docsGroup.Static("/", "docs")

In docs is an index.html which was delivered when no path was given.

Now I need to use docsGroup.File("/", "docs/index.html") to make it work again.

The change was somewhere between 4.1.3 and 4.1.5.

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs
@pablote
Copy link

@pablote pablote commented Oct 27, 2019

I'm running into a similar issue, might be related, started happening after I moved to v4 from v3.

This routes used to work:

e.Static("/", "web/public")
e.Static("/dashboard", "web/public")
e.Static("/sessionexpired", "web/public")

Now only the first route works, the other ones do not. They do work however if I add a trailing slash on the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.