更新时间:2023-02-05 12:32:03
经过这么长时间,我终于解决了这个问题.我将API保留在单独的域中,但是将前端和后端集成在同一个域中,但位于不同的子文件夹中.所以现在我有:
I've finally solved this problem, after so much time. I kept API on separated domain, but had integrated front-end and back-end at the same domain but in different sub-folders. So now i have:
api.app.dev
app.dev
(前端)
app.dev/backend
和(本机)会话现在像魅力一样工作.我在服务这两个子目录时也遇到了麻烦,因此我打开了新线程.我使用的nginx
设置是:
And (native) sessions now working like charm. I also had troubles with serving these two sub-directories, so i've opened new thread. There is nginx
settings whose i used:
谢谢大家!