mirror of
https://github.com/gotson/komga.git
synced 2026-01-04 06:44:06 +01:00
move API url to config
This commit is contained in:
parent
fb59df23ab
commit
2b25cc9942
3 changed files with 17 additions and 1 deletions
1
next-ui/.env.development
Normal file
1
next-ui/.env.development
Normal file
|
|
@ -0,0 +1 @@
|
|||
VITE_KOMGA_API_URL=http://localhost:8080
|
||||
|
|
@ -35,7 +35,7 @@ const coladaMiddleware: Middleware = {
|
|||
}
|
||||
|
||||
const client = createClient<paths>({
|
||||
baseUrl: 'http://localhost:8080',
|
||||
baseUrl: import.meta.env.VITE_KOMGA_API_URL,
|
||||
// required to pass the session cookie on all requests
|
||||
credentials: 'include',
|
||||
// required to avoid browser basic-auth popups
|
||||
|
|
|
|||
15
next-ui/src/vite-env.d.ts
vendored
Normal file
15
next-ui/src/vite-env.d.ts
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/// <reference types="vite/client" />
|
||||
|
||||
interface ViteTypeOptions {
|
||||
// By adding this line, you can make the type of ImportMetaEnv strict
|
||||
// to disallow unknown keys.
|
||||
strictImportMetaEnv: unknown
|
||||
}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_KOMGA_API_URL: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
Loading…
Reference in a new issue