Сейчас реализован данный конфиг nginx и при обращении фронта к бэк все ок но нужно сделать так что бы я мог обратиться к бэк со своего пк дома. Сейчас при обращении корма выдает ошибку
access to XMLHttpRequest at
qa.com from origin 'http //
localhost:3000' has been blocked by cors policy : Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request
server {
listen 80;
server_name qa.bet.com;
client_max_body_size 10M;
add_header 'Access-Control-Allow-Origin' 'qa.com';
auth_basic "Identity yourself";
auth_basic_user_file /app-auth/htpasswd;
location / {
proxy_pass
front:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 80;
server_name qa.com;
client_max_body_size 10M;
location / {
proxy_pass
api:3333;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
}
}