Skip to content
Playground(another site)

bynk.http.cors_wildcard_credentials

Error A cors policy combines credentials: true with the wildcard origin ["*"].

credentials: true lets a browser send cookies and Authorization to the service, and the Fetch standard forbids answering such a request with the wildcard origin *: the browser rejects the response at runtime. Bynk refuses the pair at compile time instead. List the origins that may send credentials, or set credentials: false if any site may call the service.

Example

cors { origins: ["*"], credentials: true } // ✗ credentials need named origins
cors { origins: ["https://app.example.com"], credentials: true } // ✓

In the Book

See also

  • Every code in its category, HTTP, on the diagnostic index.
  • bynk explain bynk.http.cors_wildcard_credentials shows the same from the installed toolchain, without a network.