Skip to content

Conversation

gdey
Copy link
Member

@gdey gdey commented Apr 6, 2021

When serving up static files we need to strip any proxy prefixes we may add onto the URL.
We forgot to check to see if the prefix had a "/" at the end of it, and if it did made sure
to strip it out, as static files should always start with a "/". However, if we did not remove
the "/" at the end of the prefix that we then use to trim the url; we would end up trimming off
the starting "/". This fixes that.

Fixes #735

When serving up static files we need to strip any proxy prefixes we may add onto the URL.
We forgot to check to see if the prefix had a "/" at the end of it, and if it did made sure
to strip it out, as static files should always start with a "/". However, if we did not remove
the "/" at the end of the prefix that we then use to trim the url; we would end up trimming off
the starting "/". This fixes that.

Fixes #735
@gdey gdey requested a review from ARolek as a code owner April 6, 2021 13:37
@gdey
Copy link
Member Author

gdey commented Apr 6, 2021

Have not had a chance to test this yet.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8e011cb69-PR-771

  • 0 of 9 (0.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 45.392%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/viewer.go 0 9 0.0%
Files with Coverage Reduction New Missed Lines %
server/viewer.go 1 40.0%
Totals Coverage Status
Change from base Build 7908653b9: -0.03%
Covered Lines: 5413
Relevant Lines: 11925

💛 - Coveralls

@gdey gdey merged commit d54a608 into v0.14.x Jun 8, 2021
@gdey gdey deleted the issue_735 branch June 8, 2021 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uri_prefix breaks with a trailing slash
2 participants