NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
**一、 fetch默认不发送cookie session** ``` get post 请求都必须加上 credentials: 'include' ``` **二、 服务端跨域请求头配置** ``` try_files $uri $uri/ /index.php?s=$uri&$args; index index.html index.htm index.php .nears.php; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers X-Requested-With; add_header Access-Control-Allow-Methods GET,POST,OPTIONS; ```