-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
missing crossorigin tag (#56 needs more work ?) #184
Comments
There's definitely something fishy going on here. I don't know enough about Symfony details, so I just did a very crude test. I edited
The result was clear,
But present on script:
I also note that @PhilETaylor test files only covered script tag and did not test link. |
Hi @udf2457, I did some tests on my end and I'm getting the |
Hi @Lyrkan , What version of PHP ? I'm on 8.1.7 on Debian. I will look into seeing what I can do to share a project. |
Hi @Lyrkan I've posted code up to a private repo and added you for access. Had to be private because I pulled my code off my internal server and so although I think I've cleaned up certain confidential references there's always that little possibility of having missed anything . I couldn't think of another way to do it, because AFAIK codesandbox wouldn't really work with the yarn/composer dependencies (or at least it would take me too much time to learn how to do it). The content in there is basically the files changed since I first installed symfony for this project and so hopefully covers everything you'd want to look at without dumping too much extra noise ! Thanks ! |
@udf2457 Thanks for the repro, I think there is an issue in your Try moving |
@Lyrkan That worked, thanks. I appreciate the second pair of eyes ! Although to be fair its not entirely my fault, I only commented out that line which was already there. The comment above it does kind of encourage people to just do that:
Maybe those two lines should be shifted higher by default ? |
Hm, I don't see any issue with the last version of the recipe: https://github.com/symfony/recipes/blob/main/symfony/webpack-encore-bundle/1.10/config/packages/webpack_encore.yaml Was it different when you created your project? |
@Lyrkan To be clearer, based on the answer you provided to my problem, and which subsequently solved my problem by implementing as you described, this is what I am suggesting: Otherwise, people (like me) will just uncomment that line and expect |
Also this comment (located just above
|
That's not what I said though, I was talking about the indentation, not the line (which doesn't matter). |
("symfony/webpack-encore-bundle": "^1.14",)
I am using
encore_entry_link_tags()
andencore_entry_script_tags()
in my templates.crossorigin: 'anonymous
has been enabled inconfig/packages/webpack_encore.yaml
The behaviour I am seeing is that
crossorigin="anonymous"
is only being added to the<script>
tags and not the<link>
tags. As a result JS loads ok, but CSS fails with CRS headers.crossorigin
is supported for<link>
tags and should therefore be implemented.(Tag #42 #55 #56 )
The text was updated successfully, but these errors were encountered: