Skip to content

Commit

Permalink
Dev: Dont force redirect on internal URL's (#949)
Browse files Browse the repository at this point in the history
* Dev: Dont force redirect on internal URL's

* Fix logic for shadowing with internal URL's
  • Loading branch information
RaeesBhatti authored Jun 16, 2020
1 parent e78c961 commit c56c0a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async function serveRedirect(req, res, proxy, match, options) {

const destStaticFile = await getStatic(dest.pathname, options.publicFolder)
let status
if (match.force || isInternal(destURL) || (!staticFile && !options.framework && destStaticFile)) {
if (match.force || (!staticFile && ((!options.framework && destStaticFile) || isInternal(destURL)))) {
req.url = destStaticFile ? destStaticFile + dest.search : destURL
status = match.status
console.log(`${NETLIFYDEVLOG} Rewrote URL to`, req.url)
Expand Down

0 comments on commit c56c0a7

Please sign in to comment.