mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 10:33:54 +00:00
webpack: Use CORS requests for stylesheets.
This seems to be required for webpack-dev-server 5.2.1, for reasons that have not yet been made public. This relies on the Access-Control-Allow-Origin: * header that we already set for static content in both development and production. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
ab24eea83e
commit
bdd11577bf
@@ -30,7 +30,7 @@
|
||||
{% block webpack %}
|
||||
{% for filename in webpack_entry(entrypoint) -%}
|
||||
{% if filename.endswith(".css") -%}
|
||||
<link href="{{ filename }}" rel="stylesheet" {% if csp_nonce %}nonce="{{ csp_nonce }}"{% endif %} />
|
||||
<link href="{{ filename }}" rel="stylesheet" crossorigin="anonymous" {% if csp_nonce %}nonce="{{ csp_nonce }}"{% endif %} />
|
||||
{% elif filename.endswith(".js") -%}
|
||||
<script src="{{ filename }}" defer crossorigin="anonymous" {% if csp_nonce %}nonce="{{ csp_nonce }}"{% endif %}></script>
|
||||
{% endif -%}
|
||||
|
||||
Reference in New Issue
Block a user