change env static variables to dynamic
This commit is contained in:
@@ -4,11 +4,6 @@ import { encodeBasicCredentials } from 'arctic/dist/request';
|
||||
import { dev } from '$app/environment';
|
||||
import type { OpnsenseWgServers } from '$lib/opnsense/wg';
|
||||
|
||||
assert(env.OPNSENSE_API_URL, 'OPNSENSE_API_URL is not set');
|
||||
assert(env.OPNSENSE_API_KEY, 'OPNSENSE_API_KEY is not set');
|
||||
assert(env.OPNSENSE_API_SECRET, 'OPNSENSE_API_SECRET is not set');
|
||||
assert(env.OPNSENSE_WG_IFNAME, 'OPNSENSE_WG_IFNAME is not set');
|
||||
|
||||
export const opnsenseUrl = env.OPNSENSE_API_URL;
|
||||
export const opnsenseAuth =
|
||||
'Basic ' + encodeBasicCredentials(env.OPNSENSE_API_KEY, env.OPNSENSE_API_SECRET);
|
||||
|
||||
Reference in New Issue
Block a user