mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): allow prefetching urls with query string (#25658)
This commit is contained in:
parent
36767e6b52
commit
25f1787922
@ -53,9 +53,6 @@ export function preloadPayload (url: string, opts: LoadPayloadOptions = {}) {
|
||||
const extension = renderJsonPayloads ? 'json' : 'js'
|
||||
function _getPayloadURL (url: string, opts: LoadPayloadOptions = {}) {
|
||||
const u = new URL(url, 'http://localhost')
|
||||
if (u.search) {
|
||||
throw new Error('Payload URL cannot contain search params: ' + url)
|
||||
}
|
||||
if (u.host !== 'localhost' || hasProtocol(u.pathname, { acceptRelative: true })) {
|
||||
throw new Error('Payload URL must not include hostname: ' + url)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user