Skip to content
New issue

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

Your server adds a header that preloads javascript when retrieving images #2094

Closed
reubenfirmin opened this issue May 27, 2023 · 1 comment
Closed
Assignees

Comments

@reubenfirmin
Copy link

> curl -i https://gohugo.io/favicon-32x32.png
HTTP/2 200 
accept-ranges: bytes
age: 41638
cache-control: public, max-age=0, must-revalidate
content-type: image/png
date: Fri, 26 May 2023 22:54:51 GMT
etag: "86f7db256823e5afffa01540b369f57b-ssl"
link: </dist/app.bundle.js>; rel=preload; as=script, </dist/main.css>; rel=preload; as=style
referrer-policy: origin-when-cross-origin
server: Netlify
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: DENY
x-nf-request-id: 01H1EC1XMA6WBNYQT8VAGF5CMC
x-xss-protection: 1; mode=block
content-length: 1648

Both curl and wget just download the image. Firefox and Chrome, if you attempt to navigate to the image, will load a little html page around it, as well as the script.

@bep bep transferred this issue from gohugoio/hugo May 27, 2023
@bep bep self-assigned this May 27, 2023
bep added a commit to gohugoio/gohugoioTheme that referenced this issue May 27, 2023
We could probably fix this by adding it to HTML pages only, but for now, just delete it.

See gohugoio/hugoDocs#2094
@bep bep closed this as completed in 1798dc0 May 27, 2023
@reubenfirmin
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants