You are not logged in.
The background uses version 1.18, the post method, the front-end uses the page developed by vue, and the vue page is opened through the browser. Due to cross-domain, the browser will issue a pre-visit OPTIONS,
The background is set up like this:
if Ctxt.Method = 'OPTIONS' then
begin
try
Ctxt.OutCustomHeaders:='Access-Control-Allow-Origin:*'; //Allow cross-domain access
result := 200;
finally
end;
end
But on the browser side, this prompt keeps appearing: Access to XMLHttpRequest at 'http://localhost:8689/api/exampi/getexampersonbasicInfo/1.0' from origin 'http://localhost:8080' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
Please, how can I set the background to solve this problem?
Offline