mirror of
https://github.com/supabase/supabase.git
synced 2026-05-31 01:42:45 +08:00
fix(api): set x-pg-application-name for dashboard (#37048)
chore(api): set x-pg-application-name for dashboard
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from 'lib/role-impersonation'
|
||||
import type { ResponseError } from 'types'
|
||||
import { sqlKeys } from './keys'
|
||||
import { DEFAULT_PLATFORM_APPLICATION_NAME } from '@supabase/pg-meta/src/constants'
|
||||
|
||||
export type ExecuteSqlVariables = {
|
||||
projectRef?: string
|
||||
@@ -73,7 +74,12 @@ export async function executeSql<T = any>(
|
||||
const result = await post('/platform/pg-meta/{ref}/query', {
|
||||
signal,
|
||||
params: {
|
||||
header: { 'x-connection-encrypted': connectionString ?? '' },
|
||||
header: {
|
||||
'x-connection-encrypted': connectionString ?? '',
|
||||
'x-pg-application-name': isStatementTimeoutDisabled
|
||||
? 'supabase/dashboard-query-editor'
|
||||
: DEFAULT_PLATFORM_APPLICATION_NAME,
|
||||
},
|
||||
path: { ref: projectRef },
|
||||
// @ts-expect-error: This is just a client side thing to identify queries better
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user