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

Added http redirect to index.html #20

Merged
merged 2 commits into from
Jun 12, 2019
Merged

Conversation

elbcoast
Copy link
Contributor

The Handler has been extended, so that requests that don't have a filename in the path get redirected to the swagger index.html.

Additionally, the regexp for the filename validation has been cleaned up and the filename whitelist has been removed. The implementation now relies on the webdav Handler to create a 404 response if a file can't be found.

@codecov-io
Copy link

codecov-io commented May 11, 2019

Codecov Report

Merging #20 into master will decrease coverage by 1.57%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #20      +/-   ##
=======================================
- Coverage   81.57%   80%   -1.58%     
=======================================
  Files           1     1              
  Lines          38    35       -3     
=======================================
- Hits           31    28       -3     
  Misses          5     5              
  Partials        2     2
Impacted Files Coverage Δ
swagger.go 80% <100%> (-1.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79126c0...c9e2202. Read the comment docs.

Copy link
Member

@easonlin404 easonlin404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@easonlin404
Copy link
Member

@elbcoast Thanks for your contributions. 💯

@rafbel
Copy link

rafbel commented Jul 29, 2020

So I am still having this issue. If the path is "/swagger/" it will redirect to "/swagger/index.html", but it won't redirect from "/swagger" to "/swagger/index.html".

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.

None yet

4 participants