You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "4869conan (via GitHub)" <gi...@apache.org> on 2025/05/08 02:37:26 UTC
[D] Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. [superset]
GitHub user 4869conan created a discussion: Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
I want to embed the superset integration into my own Spring Boot project, but there is an error in the browser console saying 'Rejused to display' http://localhost:8080/ In a frame because it sets' X-Frame-Options' to 'ameorigin'. The prerequisite is that the superset has already been started in the Docker container. My superset-config.py and docker-compose.yml have also been configured. But it still reports an error, please help me solve it





GitHub link: https://github.com/apache/superset/discussions/33383
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
<!-- Greeting -->
Hello @4869conan! I'm [Dosu](https://dosu.dev), your friendly bot here to help you solve bugs, answer questions, and become a contributor. I'm ready to assist you while you wait for a human maintainer. Let's tackle this issue together!
<!-- Answer -->
To resolve the "X-Frame-Options: sameorigin" error when embedding an Apache Superset dashboard, you can try the following steps:
1. **Modify HTTP Headers in `superset_config.py`:**
Add or modify the `HTTP_HEADERS` configuration to allow framing:
```python
HTTP_HEADERS = {
'X-Frame-Options': 'ALLOWALL'
}
```
2. **Configure Content Security Policy (CSP):**
Ensure that your `superset_config.py` includes a CSP configuration that allows your domain:
```python
TALISMAN_CONFIG = {
'content_security_policy': {
'frame-ancestors': ['your-domain-here']
}
}
```
Replace `'your-domain-here'` with the actual domain where the dashboard will be embedded.
3. **Restart Superset:**
After making these changes, restart your Superset instance to apply the new configuration.
These steps should help resolve the issue by allowing the Superset dashboard to be embedded in your Spring Boot project.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=ca8cdd77-3afc-45eb-b091-1016f208d711) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/33383#discussioncomment-13070276
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. [superset]
Posted by "ArtemSydun (via GitHub)" <gi...@apache.org>.
GitHub user ArtemSydun added a comment to the discussion: Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Nope, this does not work...
GitHub link: https://github.com/apache/superset/discussions/33383#discussioncomment-16918276
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Refused to display 'http://localhost:8080/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
<!-- Greeting -->
Hello @4869conan! I'm [Dosu](https://dosu.dev), your friendly bot here to help you solve bugs, answer questions, and become a contributor. I'm ready to assist you while you wait for a human maintainer. Let's tackle this issue together!
<!-- Answer -->
To resolve the "X-Frame-Options: sameorigin" error when embedding an Apache Superset dashboard, you can try the following steps:
1. **Modify HTTP Headers in `superset_config.py`:**
Add or modify the `HTTP_HEADERS` configuration to allow framing:
```python
HTTP_HEADERS = {
'X-Frame-Options': 'ALLOWALL'
}
```
2. **Configure Content Security Policy (CSP):**
Ensure that your `superset_config.py` includes a CSP configuration that allows your domain:
```python
TALISMAN_CONFIG = {
'content_security_policy': {
'frame-ancestors': ['your-domain-here']
}
}
```
Replace `'your-domain-here'` with the actual domain where the dashboard will be embedded.
3. **Restart Superset:**
After making these changes, restart your Superset instance to apply the new configuration.
These steps should help resolve the issue by allowing the Superset dashboard to be embedded in your Spring Boot project.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ca8cdd77-3afc-45eb-b091-1016f208d711?feedback_type=other)</sup>
GitHub link: https://github.com/apache/superset/discussions/33383#discussioncomment-13070276
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org