Skip to content

fix(web): serve axios from jsdelivr (cdnjs is missing 1.12.x) - #38

Merged
LarryLuTW merged 1 commit into
masterfrom
fix/axios-cdn
May 23, 2026
Merged

fix(web): serve axios from jsdelivr (cdnjs is missing 1.12.x)#38
LarryLuTW merged 1 commit into
masterfrom
fix/axios-cdn

Conversation

@LarryLuTW

Copy link
Copy Markdown
Owner

cdnjs returns HTTP 404 with content-type: text/html for axios@1.12.x, even though their metadata API lists 1.12.2 as the current version. With X-Content-Type-Options: nosniff, the browser refuses to execute the response as JavaScript and the page falls over (all button POSTs fail because axios is undefined).

Swapping the URL to jsdelivr serves the exact same 1.12.2 file with content-type: application/javascript. Verified:

$ curl -sI https://cdn.jsdelivr.net/npm/axios@1.12.2/dist/axios.min.js
HTTP/2 200
content-type: application/javascript; charset=utf-8
content-length: 54937
cache-control: public, max-age=31536000, immutable

No behavior change \u2014 same version, same code.

cdnjs returns HTTP 404 with content-type text/html for axios@1.12.x even
though their metadata API lists 1.12.2 as current. The browser then blocks
the response because of X-Content-Type-Options: nosniff. Switching to
jsdelivr serves the same 1.12.2 file with content-type application/javascript.
@LarryLuTW
LarryLuTW merged commit 6a2944c into master May 23, 2026
3 checks passed
@LarryLuTW
LarryLuTW deleted the fix/axios-cdn branch May 23, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant