Tool Hub

CORS सिमुलेटर

ब्राउज़र अनुरोध + सर्वर नीति → अनुमति/अवरुद्ध + preflight आवश्यक

Browser request

Authorization

Server policy

GETPOST
AuthorizationContent-Type

Reasons

Preflight required (GET method or non-simple headers)

Preflight (OPTIONS) response headers

Access-Control-Allow-Originhttps://example.com
Access-Control-Allow-MethodsGET, POST
Access-Control-Allow-HeadersAuthorization, Content-Type

कैसे उपयोग करें

  1. Fill in the browser request section: choose an HTTP method, enter the requesting origin, set a Content-Type, and add any custom headers.
  2. Fill in the server policy section: set Access-Control-Allow-Origin, allowed methods, allowed headers, and the credentials flag.
  3. Read the result — the tool tells you whether the request is allowed or blocked, and whether a preflight OPTIONS request is required.
  4. Adjust any field to explore how changing the policy or request affects the CORS outcome.

उदाहरण

  • Request from https://app.example.com with method POST and server policy Access-Control-Allow-Origin: * shows allowed, no preflight needed for simple requests.
  • Adding a custom header X-Api-Key to the request while the server Allow-Headers list is empty triggers a preflight requirement and a blocked result.

उत्पादन में उपयोग से पहले आउटपुट सत्यापित करें। कोई वारंटी नहीं — देखें शर्तें.