原创 yii2 restful 401+nginx+axios跨域設置問題

1.一般的跨域get和post,通過設置nginx就可以解決。在nginx.conf的http中加入以下代碼即可 add_header Access-Control-Allow-Origin *; add_header Access-Co