Skip to content
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

fix: disable domain sharding on explore view #10787

Merged
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
10 changes: 8 additions & 2 deletions superset-frontend/src/chart/chartAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { addDangerToast } from '../messageToasts/actions';
import { logEvent } from '../logger/actions';
import { Logger, LOG_ACTIONS_LOAD_CHART } from '../logger/LogUtils';
import getClientErrorObject from '../utils/getClientErrorObject';
import { allowCrossDomain as allowDomainSharding } from '../utils/hostNamesConfig';
import { allowCrossDomain as domainShardingEnabled } from '../utils/hostNamesConfig';

export const CHART_UPDATE_STARTED = 'CHART_UPDATE_STARTED';
export function chartUpdateStarted(queryController, latestQueryFormData, key) {
Expand Down Expand Up @@ -106,6 +106,9 @@ const legacyChartDataRequest = async (
requestParams = {},
) => {
const endpointType = getLegacyEndpointType({ resultFormat, resultType });
const allowDomainSharding =
// eslint-disable-next-line camelcase
domainShardingEnabled && requestParams?.dashboard_id;
const url = getExploreUrl({
formData,
endpointType,
Expand Down Expand Up @@ -153,6 +156,9 @@ const v1ChartDataRequest = async (
const qs = requestParams.dashboard_id
? { dashboard_id: requestParams.dashboard_id }
: {};
const allowDomainSharding =
// eslint-disable-next-line camelcase
domainShardingEnabled && requestParams?.dashboard_id;
const url = getChartDataUri({
path: '/api/v1/chart/data',
qs,
Expand Down Expand Up @@ -182,7 +188,7 @@ export async function getChartDataRequest({
...requestParams,
};

if (allowDomainSharding) {
if (domainShardingEnabled) {
querySettings = {
...querySettings,
mode: 'cors',
Expand Down