Welcome! Log In Create A New Profile

Advanced

CORS Error

August 14, 2019 10:55PM
Here is the code:

location ~ \.php$ {
include snippets/fastcgi-php.conf;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME /var/www/test/public$fastcgi_script_name;

#CORS SETTINGS
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS, DELETE';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-
Control,Content-Type,Content-Range,Range,Authorization';
}


ERROR
invalid number of arguments in "add_header"

CAUSE
add_header 'Access-Control-Allow-Origin' '*' always;
when I do add the word "always"
Subject Author Posted

CORS Error

justcode August 14, 2019 10:55PM

Re: CORS Error

Francis Daly August 16, 2019 04:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready