V
V
Vadim2022-02-18 15:40:53
CORS
Vadim, 2022-02-18 15:40:53

Are these Headers required - Access-Control-Allow-Headers?

Hey everyone,

figuring out CORS - preflight requests: OPTIONS returned, let's say the following

Access-Control-Allow-Headers: "'Content-Type,Authorisation,My-Api-Key,RestricteduserID'"


if subsequent requests to the server, for example GET to some resource, do not contain all these Headers, will a cors error occur? Or are these Headers just recommended?

all the best,
Vadim

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rag'n' Code Man, 2022-02-18
@iDmitriyWinX

The server returns you the allowed request headers, you can not specify them at all or specify them all at once, but if you add a header to the request that the server does not allow, for example, some not-allowed-header, then the server will not accept your request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question