Show in browser JavaScript error: Uncaught EvalError: #9894

Closed
opened 2025-11-02 08:52:28 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @JulyLies on GitHub (Nov 27, 2022).

Description

Show in browser is JavaScript error: Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' http: https: data: blob: 'unsafe-inline'".
(https://git.huangdf.xyz/assets/js/index.js?v=1.18.0~rc1 @ 12:47048). Open browser console to see more details.

Screenshots

jsError

Gitea Version

1.18.0+rc1

Can you reproduce the bug on the Gitea demo site?

No

Operating System

win11

Browser Version

Microsoft Edge(107.0.1418.56) Google Chrome( 107.0.5304.107)

Originally created by @JulyLies on GitHub (Nov 27, 2022). ### Description Show in browser is JavaScript error: Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' http: https: data: blob: 'unsafe-inline'". (https://git.huangdf.xyz/assets/js/index.js?v=1.18.0~rc1 @ 12:47048). Open browser console to see more details. ### Screenshots ![jsError](https://www.huangdf.xyz/upload/2022/11/jsError.png) ### Gitea Version 1.18.0+rc1 ### Can you reproduce the bug on the Gitea demo site? No ### Operating System win11 ### Browser Version Microsoft Edge(107.0.1418.56) Google Chrome( 107.0.5304.107)
GiteaMirror added the topic/uitype/bug labels 2025-11-02 08:52:28 -06:00
Author
Owner

@silverwind commented on GitHub (Nov 28, 2022):

You are serving Gitea through an proxy that adds a incompatible CSP header to responses.

CSP compatibility is a goal, but I don't expect it to be fully fixed anytime soon. See

https://github.com/go-gitea/gitea/issues/19851
https://github.com/go-gitea/gitea/issues/305

@silverwind commented on GitHub (Nov 28, 2022): You are serving Gitea through an proxy that adds a incompatible CSP header to responses. CSP compatibility is a goal, but I don't expect it to be fully fixed anytime soon. See https://github.com/go-gitea/gitea/issues/19851 https://github.com/go-gitea/gitea/issues/305
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9894