79253304

Date: 2024-12-05 03:23:48
Score: 0.5
Natty:
Report link

The Clients like Postman or thunderclient, the CORS Policy will be bypassed.

but in Browsers: for any dev or local, The Response header from backend should include to allow access from cross origins, similar to this: 'headers': { 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'OPTIONS,POST,GET' },

if production, try to include only the specific domain of the frontend: 'headers': { 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Allow-Origin': 'https://your-frontend-domain.com', 'Access-Control-Allow-Methods': 'OPTIONS,POST,GET' },

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: vishwa