Computer Science, asked by vaibhavtandon98, 1 year ago

How to deal with CORS from frontend without making any proxy server?​

Answers

Answered by Anonymous
1

Required Answer :-

Fix two: Send your request to a proxy You can't ask your users to trick their browsers by installing a plugin that applies an header in the frontend.

But you can control the backend address that the web app's API requests are going to.

The cors-anywhere server is a proxy that adds CORS headers to a request.

The way to fix this problem consists of :-

Add the support of the OPTIONS method so that CORS preflight requests are valid.

Add the Access-Control-Allow-Origin header in your response so that the browser can check the request validity.

  • Hope it helps...
  • follow me...

Attachments:
Similar questions