Skip to content

feat: 添加CSRF_TRUSTED_ORIGINS配置 #7625 #7720

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ def monitor_report_config():

from bk_monitor_report import MonitorReporter # noqa
from bk_monitor_report.contrib.celery import MonitorReportStep # noqa

from blueapps.core.celery import celery_app # noqa

reporter = MonitorReporter(
Expand Down Expand Up @@ -937,3 +938,8 @@ def minimum_database_version(self):

# 将补丁应用到 DatabaseFeatures 中
DatabaseFeatures.minimum_database_version = PatchFeatures.minimum_database_version

SCHEME_HTTPS = "https"
SCHEME_HTTP = "http"
BKPAAS_BK_DOMAIN = env.BKPAAS_BK_DOMAIN
CSRF_TRUSTED_ORIGINS = [f"{SCHEME_HTTPS}://*.{BKPAAS_BK_DOMAIN}", f"{SCHEME_HTTP}://*.{BKPAAS_BK_DOMAIN}"]
2 changes: 1 addition & 1 deletion gcloud/apigw/management/commands/data/api-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ paths:
backend:
type: HTTP
method: post
path: /{env.api_sub_path}apigw/copy_template_across_project/{project_id>}/
path: /{env.api_sub_path}apigw/copy_template_across_project/{project_id}/
matchSubpath: false
timeout: 0
upstreams: {}
Expand Down
Loading