Fix login button and improve CORS
All checks were successful
Build Frontend / Build Frontend (push) Successful in 22s
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:
16
index.js
16
index.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user