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

CORS error : "crossorigin" attribute always present for "click-to-copy" script #1871

Open
dgombert opened this issue Feb 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working needs-triage

Comments

@dgombert
Copy link

dgombert commented Feb 20, 2024

Environment

  • Version of Docsy you are using: latest
  • Version of Hugo you are using (output of hugo version): v0.121.2

Problem

When I generated my site with the Hugo and Docsy theme in an environment other than "production", I got a CORS problem on the click-to-copy.js script when I opened the "public/index.html" file locally.

In the "partials/layout/script.html" file, for the scripts contained in "assets/js", the crossorigin attribute is absent or conditioned by the "Production" environment. Only the "click-to-copy.js" script contains the crossorigin attribute without condition.

Is this an issue or a desired behavior for which I don't have an explanation?

Step to reproduce :

  • run hugo -e developpement
  • Open locally "public/index.html"
  • Show in browser console, the CORS error
@dgombert dgombert added bug Something isn't working needs-triage labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants