ошибка cors или заголовки с сервера не отправляются?

у меня есть /nginx/sites-enabled/auth_syqq.conf:

server {
    listen 443 ssl;
    server_name auth.syqq.ru;

    ssl_certificate /etc/ssl/nginx/syqq.ru.crt;
    ssl_certificate_key /etc/ssl/nginx/syqq.ru.key;

    location /auth {
        proxy_pass http://localhost:3748;
        proxy_set_header Access-Control-Allow-Origin *;
        proxy_set_header Host $host;
    }
}

и этот nodejs/index.js:

const express = require('express');
    const cors = require('cors');
    require('dotenv').config();

    const app = express();
    const PORT = process.env.PORT || 4500;

    app.use(cors({
        origin: ["https://syqq.ru", "https://auth.syqq.ru"],
        allowedHeaders: ["Accept-Version", "Authorization", "Credentials", "Content-Type"]
    }));
    app.use(express.json({ extended: true, limit: '50mb' }));

    app.use('/auth', require('./routes/auth.route.js'));
    app.use('/admin', require('./routes/admin.route.js'));

    function runServer(port) {
        app.listen(port, () => {
        console.log(`Server is running on port ${port}`);
        });
    }

    runServer(PORT);

все, я могу подключиться через postman (https://auth.syqq.ru/auth), но из браузера это не работает

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://auth.syqq.ru/auth/check_auth. (Reason: CORS request did not succeed). Status code: (null).
2
Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource. 

Ответы (0 шт):