mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
Revert "console: tag console requests"
Reverts hasura/graphql-engine-mono#143 GitOrigin-RevId: fa16726ec4ea6f69153b0105c08de017874d158a
This commit is contained in:
parent
b4fd2e3f9f
commit
8dad2da178
@ -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)
|
||||
|
@ -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';
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user