Skip to content

Commit

Permalink
doc(csp): add correct csp rule (apache#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chever-John authored Aug 3, 2022
1 parent d5dc2a9 commit d67a5a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions api/conf/conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ conf:
# access_control_allow_headers: "Authorization"
# access_control-allow_methods: "*"
# x_frame_options: "deny"
# content_security_policy: ""default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'""

# content_security_policy: "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-src xx.xx.xx.xx:3000" # You can set frame-src to provide content for your grafana panel.

authentication:
secret:
Expand Down
2 changes: 2 additions & 0 deletions docs/en/latest/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ The following are parts of the modules' snapshot.

We support the monitor page by referencing it in [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe). Before accessing [Grafana](https://grafana.com/), please Enable [`allow_embedding=true`](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_embedding), which defaults to `false`. This causes the browser to fail to render Grafana pages properly due to security policies.

Solving this problem requires you to configure some csp rules. Please check the default configuration options for details. You can refer to this [link](https://github.com/apache/apisix-dashboard/blob/master/api/conf/conf.yaml) for the recommand rule.

![Dashboard-en](https://user-images.githubusercontent.com/40708551/112922395-0eed0380-912a-11eb-8c92-4c67d2bae4a8.png)

## Route
Expand Down

0 comments on commit d67a5a3

Please sign in to comment.