- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 772
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
Fix swagger console backslash redirect for aiohttp (thanks @pando85) #843
Conversation
92111c6
to
f057013
Compare
1dd1c1d
to
6a650f8
Compare
Won't this introduce a mismatch between this endpoint and all the others? |
@jmcs good point. I guess the best path forward is to look into enabling this for all routes on aiohttp to make the behavior similar to flask? |
It turns out we have to manually add a redirect for this route specifically because AioHttp removes the trailing slash from the static_files route (ui/*). See https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_urldispatcher.py#L1049 I'll also add the middleware for redirecting all other routes to trailing slashes. |
3e579a3
to
43c2888
Compare
Note, this depends on #823 |
43c2888
to
0106f6a
Compare
Wow this was a real rabbit hole to go down. 🐰 |
0106f6a
to
420a927
Compare
I've also put in a PR with aiohttp to change the default redirect code to |
420a927
to
47634bb
Compare
5a7d2fe
to
3552b72
Compare
@dtkav can you figure out why the flake8 started failing? |
151eafb
to
e822b0f
Compare
99a22d8
to
858e7f5
Compare
👍 |
Fixes #831
Changes proposed in this pull request: