Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ pids/
.env
.env.*
!.env.example
!.env.staging
!.env.production

# =====================================================
# IDEs and Editors
Expand Down Expand Up @@ -185,3 +187,4 @@ docker-compose.override.yml

## Diagnostic reports
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
.vercel
5 changes: 4 additions & 1 deletion src/backend/src/FantasyRealm.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ private static void Main(string[] args)
builder.Services.AddSwaggerGen();

// CORS configuration
var corsOrigins = builder.Configuration["CorsOrigins"]?.Split(',')
?? new[] { "http://localhost:5173" };

builder.Services.AddCors(options =>
{
options.AddPolicy("AllowFrontend", policy =>
{
policy.WithOrigins("http://localhost:5173")
policy.WithOrigins(corsOrigins)
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials();
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Production environment - Railway backend (à configurer quand l'environnement de production sera créé)
# VITE_API_URL=https://fantasyrealm-api-production.up.railway.app/api
2 changes: 2 additions & 0 deletions src/frontend/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Staging environment - Railway backend
VITE_API_URL=https://fantasyrealm-api-staging.up.railway.app/api
1 change: 1 addition & 0 deletions src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:staging": "tsc -b && vite build --mode staging",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
Expand Down