Fix login button and improve CORS
All checks were successful
Build Frontend / Build Frontend (push) Successful in 22s

- Fixed login URL from /auth/steam to /api/auth/steam
- Updated all Steam login buttons to custom green design with 'Login to Steam' text
- Enhanced CORS configuration with explicit preflight handling
- Added Steam image proxy endpoint for CORS-free image loading
- Improved environment variable management with .env.local support
- Added ENV_SETUP.md guide for environment configuration
This commit is contained in:
2026-01-11 01:39:35 +00:00
parent 91f01cd1cf
commit e7ea8f12b6
9 changed files with 465 additions and 148 deletions

View File

@@ -91,9 +91,19 @@ const registerPlugins = async (fastify) => {
}
},
credentials: true,
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
allowedHeaders: ["Content-Type", "Authorization", "Cookie"],
exposedHeaders: ["Set-Cookie"],
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"],
allowedHeaders: [
"Content-Type",
"Authorization",
"Cookie",
"X-Requested-With",
"Accept",
],
exposedHeaders: ["Set-Cookie", "Content-Type"],
preflight: true,
preflightContinue: false,
optionsSuccessStatus: 204,
maxAge: 86400, // Cache preflight requests for 24 hours
});
// Security headers