Fix Docker

This commit is contained in:
2025-11-20 15:07:01 -03:00
parent e1f46dbd1d
commit 6e2c51aa35
2 changed files with 12 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ builder.Services.AddCors(options =>
options.AddPolicy(name: myAllowSpecificOrigins, options.AddPolicy(name: myAllowSpecificOrigins,
policy => policy =>
{ {
policy.WithOrigins("http://192.168.5.129:8081", "http://192.168.5.129:8082", "http://localhost:5173", "http://localhost:5174") policy.WithOrigins("192.168.10.78", "http://192.168.5.129:8081", "http://192.168.5.129:8082", "http://localhost:5173", "http://localhost:5174")
.AllowAnyHeader() .AllowAnyHeader()
.AllowAnyMethod(); .AllowAnyMethod();
}); });

View File

@@ -39,8 +39,18 @@ server {
# 3. Servidor separado para el Panel de Administración # 3. Servidor separado para el Panel de Administración
server { server {
listen 81; # Puerto de escucha para el tráfico del panel de admin listen 81;
# MISMA REGLA DE API
location /api/ {
proxy_pass http://api_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# El resto del tráfico va al frontend del admin
location / { location / {
proxy_pass http://admin_server; proxy_pass http://admin_server;
proxy_set_header Host $host; proxy_set_header Host $host;