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

Add slash to paths that need them in serve #247

Merged
merged 3 commits into from
Feb 26, 2019

Conversation

matt-gadd
Copy link
Contributor

Type: bug

Description:
In serve mode, if serve-static can't resolve a file it sends a 301 redirect with an additional slash. This causes problems with relative paths on the page afterwards.

Rather than having this behaviour, instead opt to add the slash before resolving in serve-static.

@matt-gadd matt-gadd added the bug label Feb 25, 2019
@codecov
Copy link

codecov bot commented Feb 26, 2019

Codecov Report

Merging #247 into master will decrease coverage by 0.26%.
The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #247      +/-   ##
==========================================
- Coverage   52.52%   52.25%   -0.27%     
==========================================
  Files          10       10              
  Lines         615      620       +5     
  Branches      155      156       +1     
==========================================
+ Hits          323      324       +1     
- Misses        292      296       +4
Impacted Files Coverage Δ
src/main.ts 88.63% <20%> (-2.01%) ⬇️

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 98ab389...468386e. Read the comment docs.

@matt-gadd matt-gadd merged commit 9dc1109 into dojo:master Feb 26, 2019
agubler pushed a commit to agubler/cli-build-app that referenced this pull request Mar 7, 2019
* add slash to paths that need them

* only rewrite on html type requests

* fix test
agubler added a commit that referenced this pull request Mar 21, 2019
* Add slash to paths that need them in serve (#247)

* add slash to paths that need them

* only rewrite on html type requests

* fix test

* Change path rewriting to use req.accepts in serve mode (#253)

* change to using req.accepts

* package-lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants