Same-Origin Policy Tester.

Test cross-origin requests and evaluate Same-Origin Policy restrictions.

Same-Origin Policy Tester

https://example.com
https://api.example.com
Request Status:
Blocked
Recommendations
  • Consider using CORS headers to allow cross-origin requests
  • You may need to implement a CORS preflight request handler

Example Scenarios

Common

Basic AJAX Request
Common XMLHttpRequest to same domain with different subdomain
XHR
AJAX
Subdomain
API
CDN Resource Loading
Loading a script from a common CDN provider
SCRIPT
CDN
Script Loading
Third-party
Iframe Embedding
Embedding content from different origin in an iframe
IFRAME
iframe
Embedding
Third-party
Microservices Communication
Frontend accessing multiple backend services
XHR
Microservices
API
Architecture

Security

Cross-Protocol Access
HTTP to HTTPS upgrade scenario
XHR
Mixed Content
Security
HTTPS
Form Submission
Cross-origin form POST to payment processor
FORM
Form
Payment
POST

Edge Cases

Non-standard Port
Development server on custom port accessing production API
XHR
Development
Local
API
WebSocket Connection
Establishing WebSocket connection to real-time service
XHR
WebSocket
Real-time
Protocol

How it works

Four steps.

  1. 01

    Enter the source and target origins, including scheme, host, and port.

  2. 02

    Select the request type (XHR, image, script, iframe, etc.) and access type.

  3. 03

    Run the test to check whether the request is allowed or blocked.

  4. 04

    Review warnings and recommendations for resolving policy restrictions.

Features

Analyze Cross-Origin Request Behavior.

Simulate cross-origin requests and understand how browsers enforce the Same-Origin Policy.
  • Simulate Cross-Origin Requests

    Test requests between different origins to analyze Same-Origin Policy enforcement.

  • Supports Various Request Types

    Test XHR, fetch, images, scripts, styles, iframes, and forms for cross-origin behavior.

  • Get Security Recommendations

    Receive warnings and best practices to resolve blocked cross-origin requests.

FAQ

Questions.

Can't find an answer? Send us your question.

What is the Same-Origin Policy?

The Same-Origin Policy restricts how documents and scripts from different origins can interact to prevent security risks.

How can I bypass Same-Origin Policy restrictions?

Using Cross-Origin Resource Sharing (CORS) headers allows controlled access to resources from different origins.

Why are my requests being blocked?

Requests may be blocked due to different schemes, hosts, or ports. Using HTTPS and proper CORS policies can help.

Does this tool modify browser settings?

No, this tool only simulates how browsers enforce the Same-Origin Policy for learning and debugging purposes.

Related tools

More Utilities tools.