Skip to content

Commit

Permalink
fix(app-vite): Correctly use WHATWG URL constructor
Browse files Browse the repository at this point in the history
Here is a lengthy discussion about the problem nodejs/node#12682
  • Loading branch information
yusufkandemir committed Mar 28, 2022
1 parent ef9395c commit 97d47b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app-vite/lib/modes/ssr/ssr-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class SsrDevServer extends AppDevserver {
const { publicPath } = this.#appOptions

publicPath !== '/' && app.use((req, res, next) => {
const pathname = new URL(req.url).pathname || '/'
const pathname = new URL(req.url, `http://${request.headers.host}`).pathname || '/'

if (pathname.startsWith(publicPath) === true) {
next()
Expand Down

0 comments on commit 97d47b7

Please sign in to comment.