да
вот настройки на сервере : this.app.use( cors({ origin: "http://513092561a21.ngrok.io", optionsSuccessStatus: 200, credentials: true }) ); this.app.use(logger('dev')); this.app.use(cookieParser("ThisIsHowYouUseRedisSessionStorage")); const redisClient = redis.createClient(); const redisStore = connectRedis(session); this.app.use(session({ secret: 'ThisIsHowYouUseRedisSessionStorage', name: '_redisPractice', resave: true, saveUninitialized: true, cookie: {maxAge:36000, secure: false, httpOnly: false }, store: new redisStore({ host: 'localhost', port: 6379, client: redisClient, ttl: 86400 }), })); this.app.use(function(req, res, next) { res.header('Access-Control-Allow-Credentials', "true"); res.header('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE'); res.header("Access-Control-Allow-Origin", "http://513092561a21.ngrok.io"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization"); next(); });
У вас больше никаких догадок не осталось?
Обсуждают сегодня