Skip to content

Commit

Permalink
refactor: update API base URL construction to use window protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
srijanpatel committed Jan 10, 2025
1 parent 2c97b63 commit 831e3d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { NodeTypeSchema, MinimumNodeConfigSchema } from '@/types/api_types/nodeT
import { OutputFileResponse, OutputFileCreate, OutputFileUpdate } from '@/types/api_types/outputFileSchemas'
import { RunResponse } from '@/types/api_types/runSchemas'

const API_BASE_URL = typeof window !== 'undefined' ? `http://${window.location.host}/api` : 'http://localhost:6080/api'
const API_BASE_URL =
typeof window !== 'undefined'
? `${window.location.protocol}//${window.location.host}/api`
: 'http://localhost:6080/api'

export interface ApiKey {
name: string
Expand Down

0 comments on commit 831e3d6

Please sign in to comment.