[Vuejs]-Axios post and problem with CORS in CodeIgniter 4

0๐Ÿ‘

  1. Try:
<IfModule mod_headers.c>
    Header always set Access-Control-Allow-Origin "http://localhost:8081"
    Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
</IfModule>
  1. Enable apache module headers and restart the Apache service.

Apache: difference between "Header always set" and "Header set"?

Enable mod_headers in Apache in Windows

Leave a comment