Skip to content

Using posix path resolution. Resolves serve issue #525 - #89

Merged
leo merged 1 commit into
vercel:masterfrom
internettrans:serve-issue-525
Jun 19, 2019
Merged

Using posix path resolution. Resolves serve issue #525#89
leo merged 1 commit into
vercel:masterfrom
internettrans:serve-issue-525

Conversation

@internettrans

@internettrans internettrans commented Jun 6, 2019

Copy link
Copy Markdown

Resolves vercel/serve#525

path.resolve('/some-url') returns C:\\some-url in Windows. Which breaks rewrites and makes the serve --single option not work in windows.

Using path.posix gives us linux/unix/posix functionality for resolving the path, which preserves the security fix that was added in #76 while still working in Windows.

I have verified that the --single option works with my changes, in both Windows 10 and Mac.

@codecov

codecov Bot commented Jun 6, 2019

Copy link
Copy Markdown

Codecov Report

Merging #89 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #89   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         324    324           
=====================================
  Hits          324    324
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

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 b5f9463...0e13f04. Read the comment docs.

@Matt-J-Hosking

Copy link
Copy Markdown

I approve! :) Please get this one in.

@leo leo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The tests are green. Thank you!

@leo
leo merged commit 0bd3eff into vercel:master Jun 19, 2019
@internettrans
internettrans deleted the serve-issue-525 branch June 24, 2019 19:28
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.

--single option is broken since 10.1.2

3 participants