0

I would like to add an authorization to my web site through htaccess.

I added this code :

 # BEGIN Cache-Control Headers
<ifmodule mod_headers.c>
 Header set Access-Control-Allow-Origin: https://www.example.com
 Header set Access-Control-Allow-Headers: Special-Request-Header
 Header set Access-Control-Allow-Credentials: true
 Header set Access-Control-Max-Age: 240
</ifmodule>
 # END Cache-Control Headers

But the website give Internal Server Error when I try to add the line below :

 Header set Access-Control-Allow-Methods: PUT, POST, OPTIONS

A special authorization is required or it is a syntax error ?

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
MAZ
  • 222
  • 1
  • 14

1 Answers1

2

Try with "":

Header set Access-Control-Allow-Methods "PUT, POST, OPTIONS"
Croises
  • 18,570
  • 4
  • 30
  • 47