Skip to content

Commit

Permalink
fix(console): use private URLs when creating nhost client on server side
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Sep 16, 2024
1 parent e426673 commit f272971
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/console/src/lib/server/utils/nhost.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { env } from '$env/dynamic/public';
import { env } from '$env/dynamic/private';
import { NHOST_SESSION_KEY } from '$lib/constants';
import { NhostClient } from '@nhost/nhost-js';
import type { NhostSession } from '@nhost/nhost-js';
Expand All @@ -17,12 +17,12 @@ const isBrowser = typeof window !== 'undefined';
*/
export async function getServerNhost(initialSession: NhostSession | undefined, cookies: Cookies) {
const nhost = new NhostClient({
// subdomain: env.PUBLIC_NHOST_SUBDOMAIN ?? 'local',
// region: env.PUBLIC_NHOST_REGION,
authUrl: env.PUBLIC_NHOST_AUTH_URL,
graphqlUrl: env.PUBLIC_NHOST_GRAPHQL_URL,
storageUrl: env.PUBLIC_NHOST_STORAGE_URL,
functionsUrl: env.PUBLIC_NHOST_FUNCTIONS_URL,
// subdomain: env.NHOST_SUBDOMAIN ?? 'local',
// region: env.NHOST_REGION,
authUrl: env.NHOST_AUTH_URL,
graphqlUrl: env.NHOST_GRAPHQL_URL,
storageUrl: env.NHOST_STORAGE_URL,
functionsUrl: env.NHOST_FUNCTIONS_URL,
autoSignIn: false,
autoRefreshToken: false,
clientStorageType: 'cookie',
Expand Down

0 comments on commit f272971

Please sign in to comment.