Revert "console: tag console requests"

Reverts hasura/graphql-engine-mono#143

GitOrigin-RevId: fa16726ec4ea6f69153b0105c08de017874d158a
This commit is contained in:
Aleksandra Sikora 2021-01-21 11:20:56 +01:00 committed by hasura-bot
parent b4fd2e3f9f
commit 8dad2da178
3 changed files with 0 additions and 33 deletions

View File

@ -107,7 +107,6 @@ and be accessible according to the permissions that were configured for the role
- console: misc bug fixes (close #4785, #6330, #6288)
- console: allow setting table custom name (#212)
- console: support tracking VOLATILE functions as mutations or queries (close #6228)
- console: add a special header to console requests for better logging (#143)
- cli: add missing global flags for seed command (#5565)
- cli: allow seeds as alias for seed command (#5693)
- cli: fix action timeouts not being picked up in metadata operations (#6220)

View File

@ -1,25 +0,0 @@
import globals from '../Globals';
import { SERVER_CONSOLE_MODE } from '../constants';
export const getClientTypeHeader = () => {
let currentServerType = 'oss';
if (globals.serverVersion.includes('pro')) {
currentServerType = 'pro';
} else if (globals.serverVersion.includes('cloud')) {
currentServerType = 'cloud';
}
if (globals.consoleMode === SERVER_CONSOLE_MODE) {
return `hasura-console-server-${currentServerType}`;
}
// it's on the CLI
if (currentServerType === 'oss') {
return 'hasura-console-cli-oss';
}
// there's only the pro-cli
return 'hasura-console-cli-pro';
};
export const requestTagHeader = 'Hasura-Internal-Request-Source';

View File

@ -11,7 +11,6 @@ import {
CONNECTION_FAILED,
} from '../components/App/Actions';
import { globalCookiePolicy } from '../Endpoints';
import { getClientTypeHeader, requestTagHeader } from './client';
const requestAction = (
url: string,
@ -24,12 +23,6 @@ const requestAction = (
return (dispatch: any, getState: any) => {
const requestOptions = { ...options };
const currentClientType = getClientTypeHeader();
requestOptions.headers = {
...(options.headers || {}),
[requestTagHeader]: currentClientType,
};
if (!options.credentials && includeCredentials) {
requestOptions.credentials = globalCookiePolicy;
}