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

[now dev] Redirect when request has multiple slashes #2645

Merged
merged 4 commits into from Jul 29, 2019

Conversation

TooTallNate
Copy link
Member

Closes #2642.

@TooTallNate
Copy link
Member Author

TooTallNate commented Jul 26, 2019

Still needs HTML and JSON representations for the response body:

$ curl https://n8.io// --header "Accept: application/json"
{"redirect": "/", "code": 301}
$ curl https://n8.io// --header "Accept: text/html"
<!doctype html>
<!-- https://now.sh -->
<h1>Redirecting (301)</h1>
<a>/</a>
<p></p>

@dav-is
Copy link
Contributor

dav-is commented Jul 26, 2019

Only GET requests are redirected. Other types of requests are normalized without redirecting

@codecov-io
Copy link

codecov-io commented Jul 29, 2019

Codecov Report

Merging #2645 into canary will decrease coverage by 0.01%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff            @@
##           canary   #2645      +/-   ##
=========================================
- Coverage    8.14%   8.12%   -0.02%     
=========================================
  Files         259     259              
  Lines        9430    9439       +9     
  Branches     1072    1075       +3     
=========================================
- Hits          768     767       -1     
- Misses       8613    8623      +10     
  Partials       49      49
Impacted Files Coverage Δ
src/util/dev/server.ts 11% <42.85%> (-0.25%) ⬇️
src/util/dev/builder-cache.ts 29.65% <0%> (+0.1%) ⬆️

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 e132d74...40bf951. Read the comment docs.

@TooTallNate TooTallNate merged commit 64c526f into canary Jul 29, 2019
@TooTallNate TooTallNate deleted the update/now-dev-double-slashes branch July 29, 2019 18:19
AndyBitz pushed a commit that referenced this pull request Aug 5, 2019
* [now dev] Redirect when request has multiple slashes

Closes #2642.

* Add POST passthrough
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.

Double slashes are not redirected
4 participants