penambahan docker dan lain lain untuk penyesuaian docker
This commit is contained in:
@@ -67,7 +67,8 @@ export default defineEventHandler(async (event) => {
|
||||
console.log('🎲 Generated state:', state.substring(0, 8) + '...')
|
||||
|
||||
const oauthDuration = (config.oauthStateDurationMinutes || 10) * 60; // Default to 10 minutes
|
||||
const isSecure = process.env.NODE_ENV === 'production';
|
||||
const isSecure = process.env.NODE_ENV === 'production' &&
|
||||
event.node.req.headers['x-forwarded-proto'] === 'https';
|
||||
|
||||
// Store state in session cookie
|
||||
// IMPORTANT: This cookie is ONLY for the login flow (CSRF protection).
|
||||
|
||||
@@ -189,7 +189,9 @@ export default defineEventHandler(async (event) => {
|
||||
if (primaryGroup) params.append('groups', primaryGroup);
|
||||
|
||||
// Backend API URL - adjust this to match your backend
|
||||
const backendUrl = `http://10.10.123.140:8089/api/v1/permission?${params.toString()}`;
|
||||
const config = useRuntimeConfig();
|
||||
const apiBase = config.public.verificationApiBaseUrl || 'http://10.10.123.140:8089/api/v1';
|
||||
const backendUrl = `${apiBase}/permission?${params.toString()}`;
|
||||
|
||||
try {
|
||||
console.log(`📡 Fetching permissions from: ${backendUrl}`);
|
||||
|
||||
Reference in New Issue
Block a user