Skip to content

Move srcs to module of ContentSecurityPolicy::Directives

Tommy requested to merge (removed):memorycancel-master-patch-23150 into master

What does this MR do and why?

JiHu SaaS need service from Tencent(https://*.qq.com), so we need to add them into ContentSecurityPolicy

Create a new module named Gitlab::ContentSecurityPolicy::Directives, this module is used to return various SaaS related ContentSecurityPolicy Directives src which may be overridden in other variants of GitLab which is like JiHu

Modified the spec tests to make compatible between upstream and JiHu.

They are overriden by jh/lib/jh/gitlab/content_security_policy/directives.rb See gitlab-jh/gitlab!161 (diffs)

See JH MR gitlab-jh/gitlab!161 (merged)

See JH issue gitlab-jh/gitlab#331 (closed)

@godfat-gitlab Could you please help review or ask someone, thanks. CC @qianzhangxa

Edited by Tommy

Merge request reports