2

In the config/cors.php file I have the key value pair

'supports_credentials' => false,

What does "supports_credentials" do for true and what for false?

Maik Lowrey
  • 15,957
  • 6
  • 40
  • 79

1 Answers1

5

If your Request includes an Authorization header or uses Credentials mode, set the supports_credentials value in the config to true. This will set the Access-Control-Allow-Credentials Header to true.

for example, if you need to send cookies from the front-end to the back-end you need to set 'supports_credentials' to true. read more in the Mozilla docs.

Ayoub Mabrouk
  • 51
  • 1
  • 5
  • Answer shared too late!. – Sandesh Khutal May 20 '22 at 13:14
  • 2
    Hello @SandeshKhutalSaheb I am sorry that you found my answer late, but I'm afraid to tell you I had the same question in mind. I was looking for an answer, and I couldn't find yours here. So I went and looked for a convenient answer and brought it. I never heard someone say it's a late answer because it would be helpful to others, If it was the case, then Stack Overflow wouldn't allow **late answers** in here. I would love to see a useful comment from you next time. have a nice day. – Ayoub Mabrouk May 31 '22 at 08:53