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

同#744,请求示例和响应示例样式错乱 #875

Open
yvo0130 opened this issue Dec 16, 2024 · 0 comments
Open

同#744,请求示例和响应示例样式错乱 #875

yvo0130 opened this issue Dec 16, 2024 · 0 comments

Comments

@yvo0130
Copy link

yvo0130 commented Dec 16, 2024

主要原因是服务器端开启CSP,不允许行内样式以及行内脚本,前端需要配置nonce,但是目前的问题是,java中的jar包引入的是编译好的前端代码,无法进行nonce的修改,希望knife-ui去掉内联样式和脚本~
image

附上nginx配置以供参考

add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'nonce-<random-value>'; script-src 'self' 'nonce-<random-value>'; object-src 'self'; frame-ancestors 'self';img-src * data:;" always;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant