Hello I have an application that is in VUE , It is a Single Page Application built with VUE and Laravel in Backend .
Well , it is in the same server , but my front make the request with a subdomain address , maybe because that it is giving this error .
I have this structures
Front ( VUE ) -> IP - 144.222.222.222 ( an example )
Backend ( Laravel ) -> app.mywebsite.com ( an example, it is a sub domain )
so , when I make the request in VUE , I make the Request calling the sub domain address backed ( app.mywebsite.com ) .
It is giving this error -
'https://app.mywebsite.com/api/send-email' from origin 'http://144.222.222.222 ' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I tried to make a Cors , middleware , like this -
https://www.youtube.com/watch?v=84bXch-YIvI
But I was not success, it gave the same error .