GitHub user dosubot[bot] added a comment to the discussion: 400 Bad Request: The referrer does not match the host.
<!-- Answer --> The "400 Bad Request: The referrer does not match the host" error typically occurs when the 'Referer' header in your request does not match the expected value on the server side. In Superset, the 'Referer' header should be set to the base URL followed by `/api/v1/chart/warm_up_cache` if the base URL is HTTPS <sup>[[1]](https://github.com/apache/superset/blob/master/tests/integration_tests/tasks/test_cache.py)</sup>. Here are a few steps you can take to resolve this issue: 1. **Check the 'Referer' Header**: Ensure that the 'Referer' header in your request matches the expected format. If your base URL is `https://dev.myurl.company.com`, the 'Referer' should be `https://dev.myurl.company.com/api/v1/chart/warm_up_cache`. 2. **CORS Configuration**: Double-check your CORS settings to ensure that the origins and headers are correctly configured. Make sure that the `CORS_OPTIONS` and `ALLOW_ORIGINS` include the correct URLs. 3. **CSRF Token**: Verify that the CSRF token is correctly fetched and included in the request headers. This is crucial for request validation. 4. **TALISMAN and HTTP_HEADERS**: Since you have `TALISMAN_ENABLED` set to `False`, ensure that your `HTTP_HEADERS` configuration is correct. The `X-Frame-Options` and `Content-Security-Policy` should align with your intended security settings. By ensuring that these configurations are correct, you should be able to resolve the '400 Bad Request' error related to the 'Referer' header. <!-- 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/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6b335eb3-9a23-44df-9e21-c96fc3a4558a?feedback_type=other)</sup> GitHub link: https://github.com/apache/superset/discussions/33032#discussioncomment-12760357 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
