mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-28 08:49:42 +02:00
fix: ssl error when using self signed certificate (#238)
fix: ssl error when using self signed certificate with remote deployment
This commit is contained in:
parent
7fab959e26
commit
50a59164e7
10 changed files with 285 additions and 292 deletions
|
|
@ -7,12 +7,9 @@ export const createClientConfig: CreateClientConfig = (config) => {
|
|||
let baseUrl: string;
|
||||
|
||||
if (isServer) {
|
||||
// for server-side rendering, still use environment variable as fallback
|
||||
baseUrl = process.env.BACKEND_URL || 'http://api:8000';
|
||||
} else {
|
||||
// Client-side API calls are proxied through Next.js rewrites.
|
||||
// AppConfigContext may update this later with the fetched backend URL.
|
||||
baseUrl = window.location.origin;
|
||||
baseUrl = process.env.NEXT_PUBLIC_BACKEND_URL || window.location.origin;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue