We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when fetch-mock is running with fallbackToNetwork = true, any relative URLs are always prepended with /
fetch-mock
fallbackToNetwork = true
/
fetch("image.png") results in network request to "/image.png", when the index.html is not hosted on the root of the domain.
fetch("image.png")
"/image.png"
This is because of normalizeURL rebases the URL not to the current pathname:
} else { const u = new URL(url, 'http://dummy'); return u.pathname + u.search; }
The text was updated successfully, but these errors were encountered:
One potential workaround for this could be
new URL(url, typeof location === "undefined" ? 'http://dummy' : location.href);
Sorry, something went wrong.
No branches or pull requests
when
fetch-mock
is running withfallbackToNetwork = true
, any relative URLs are always prepended with/
fetch("image.png")
results in network request to"/image.png"
, when the index.html is not hosted on the root of the domain.This is because of normalizeURL rebases the URL not to the current pathname:
The text was updated successfully, but these errors were encountered: