Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

js: Enable cross-origin error debugging with crossorigin="anonymous".

Alex Vandiver1833afee6a17
diff --git a/templates/zerver/base.html b/templates/zerver/base.html
index e1e765f8b25..f923f8c6603 100644
--- a/templates/zerver/base.html
+++ b/templates/zerver/base.html
@@ -28,7 +28,7 @@
{% if filename.endswith(".css") -%}
<link href="{{ filename }}" rel="stylesheet" {% if csp_nonce %}nonce="{{ csp_nonce }}"{% endif %} />
{% elif filename.endswith(".js") -%}
- <script src="{{ filename }}" defer {% if csp_nonce %}nonce="{{ csp_nonce }}"{% endif %}></script>
+ <script src="{{ filename }}" defer crossorigin="anonymous" {% if csp_nonce %}nonce="{{ csp_nonce }}"{% endif %}></script>
{% endif -%}
{% endfor %}
{% endblock %}
diff --git a/web/webpack.config.ts b/web/webpack.config.ts
index b02306bc4e2..ff167c85a34 100644
--- a/web/webpack.config.ts
+++ b/web/webpack.config.ts
@@ -171,6 +171,7 @@ export default (
// (https://github.com/webpack/webpack/issues/11937)
(pathData) => "files" + path.join("/", pathData.filename!),
chunkFilename: production ? "[contenthash].js" : "[id].js",
+ crossOriginLoading: "anonymous",
},
resolve: {
...baseConfig.resolve,