查看: 197|回复: 0

GitLab 实例站点 CSP Header 配置

[复制链接]

30

主题

54

回帖

1043

积分

包子铺掌柜

原创
0
贡献
500
分享
1
积分
1043

特殊贡献荣誉管理

发表于 2025-8-2 15:21:49 | 显示全部楼层 |阅读模式
  1. default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.cdn.web-ide.gitlab-static.net; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://*.gitlab.com https://secure.gravatar.com https://openvsxorg.blob.core.windows.net https://open-vsx.org https://*.youtube.com; font-src 'self'; connect-src 'self' wss://code.microcharon.dev https://*.ingest.us.sentry.io https://open-vsx.org; frame-src 'self' data: https://*.cdn.web-ide.gitlab-static.net; object-src 'none'; form-action 'self' https://code.microcharon.dev https://gitlab.com https://*.gitlab.com; base-uri 'self'; frame-ancestors 'self'; worker-src 'self' blob: https://*.cdn.web-ide.gitlab-static.net;
复制代码

  1. Refused to load the image 'https://img.youtube.com/vi/ZkIkaJDEcEE/hqdefault.jpg' because it violates the following Content Security Policy directive: "img-src 'self' data: blob: https://*.gitlab.com https://secure.gravatar.com https://openvsxorg.blob.core.windows.net https://open-vsx.org injections.adguard.org".
复制代码


由于 What's New 中含有 YouTube 视频,所以需要加入 *.youtube.com
IoT 24/7 @Debcharon
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系方式

相关侵权、举报、投诉及建议等,请发 E-mail:admin@cdbao.org

Powered by Discuz! X5.0 Licensed © 2001-2026 Discuz! Team.

在本版发帖
联系方式
返回顶部
快速回复 返回顶部 返回列表