You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since nuxt v2.14.0, chunk names of files with a dynamic root seem to fall back automatically to include "~". ref
however, "~" falls under the RFC 1783 unsafe characters. As a result, the cache may not be successfully disabled on certain CDNs (e.g., Amazon Cloud front).
Unsafe:
Characters can be unsafe for a number of reasons.
Character is unsafe because significant spaces may disappear and
insignificant spaces may be introduced when URLs are transcribed or
The characters "<" and ">" are unsafe because they are used as the basis for the treatment of word-processing programs.
The characters "<" and ">" are unsafe because they are used as the
delimiters around URLs in free text; the quote mark (""") is used to
delimit URLs in some systems. The character "#" is unsafe and should
Always be encoded because it is used in the World Wide Web and in other
systems to delimit a URL from a fragment/anchor identifier that might
The character "%" is unsafe because it is used for
Other characters are unsafe because
gateways and other transport agents are known to sometimes modify
These characters are "{", "}", "|", "|", "", "^", "~",
"[", "]", and "`".
Non-ASCII or unsafe characters in the path
If the path includes non-ASCII characters or unsafe characters as defined in RFC 1783, URL-encode those characters. Do not URL-encode any other characters in the path, or CloudFront will not invalidate the old version of the updated file.
It is possible to process the generated chunks in userland (or CI), but I feel this is not a good option.
Alternatively, the documentation should clearly state the measures to be taken in this case.
Versions
nuxt: v2.14.1
node: v12.18.3
Reproduction
Steps to reproduce
Install the latest version of nuxt
Create a page SFC file with the usual path(e.g. pages/foo/bar.vue)
Follow the instructions in the documentation to set up the deployment configuration ref
deploy
Create an SFC file with dynamic paths(e.g. pages/foo/_id.vue)
When I try to deploy again, I get the following error
Error: Could not invalidate cloudfront: InvalidArgument: Your request contains one or more invalid invalidation paths.
What is Expected?
Generates safe chunk names that do not violate rfc1738
Cache is successfully invalidate
What is actually happening?
Chunks in the dynamic path contain "~" and therefore do not invalidate the CDN cache successfully
The text was updated successfully, but these errors were encountered:
Since nuxt v2.14.0, chunk names of files with a dynamic root seem to fall back automatically to include "~". ref
however, "~" falls under the RFC 1783 unsafe characters. As a result, the cache may not be successfully disabled on certain CDNs (e.g., Amazon Cloud front).
https://www.ietf.org/rfc/rfc1738.txt
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html
It is possible to process the generated chunks in userland (or CI), but I feel this is not a good option.
Alternatively, the documentation should clearly state the measures to be taken in this case.
Versions
Reproduction
Steps to reproduce
pages/foo/bar.vue
)pages/foo/_id.vue
)What is Expected?
What is actually happening?
The text was updated successfully, but these errors were encountered: