/sop-demo

same-origin policy demo

Primary LanguageHTMLBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Same-origin policy demo

A simple web app for showing how the same-origin policy applies to cross-domain requests

Instructions

Load any page on the app's domain. Enter the URL of any page you'd like to load in the iframe (click away from the textbox to automatically update). Clicking "Update!" below the frame will try to access the embedded page. If SOP prevents this, you'll see an alert.

Pages to try

Running the site for yourself

If you don't care about HTTPS

python3 -m http.server
# or
node server.js

If you want HTTPS as part of your demo

First, update the included docker-compose.yml so that the (sub)domains match yours.

Next, you'll need to create a Docker Machine in the cloud.

docker-machine create ... your_machine_name
eval "$(docker-machine env your_machine_name)"
docker-compose up