Skip to content
Advertisement

php cors issue with axios post

I have a simple post request with axios to php script which renders some pdfs and should return a String.

Now I got this error:

JavaScript

I set this in my php file:

JavaScript

With no changes. also tried this:

JavaScript

also no changes.

my axios call looks like this:

JavaScript

What could solve this?

Thanks in advance

Advertisement

Answer

A working solution for me is:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement