Laravel Cors (Middleware NOT working)

后端 未结 8 1500
孤独总比滥情好
孤独总比滥情好 2020-12-31 12:37

I recently tries enabling CORS in Laravel 5.4 but unfortunately it doesn\'t want to work. I have included the code and the error that it\'s giving me below. Can anyone help

8条回答
  •  隐瞒了意图╮
    2020-12-31 13:13

    If none of this working, add cors on apache virtual host configuration (If you use virtual host).

    Go to /etc/apache2/sites-available and add something like this gist

    then sudo a2ensite example.conf and sudo service apache2 reload ;)

提交回复
热议问题