Skip to content

Instantly share code, notes, and snippets.

@erockdotdev
Created April 28, 2017 14:52
Show Gist options
  • Save erockdotdev/1d661aba2e9bdba3bb2bfb3e55245d3b to your computer and use it in GitHub Desktop.
Save erockdotdev/1d661aba2e9bdba3bb2bfb3e55245d3b to your computer and use it in GitHub Desktop.
LAB 1 Evaluate Same-origin Policy

LAB 1

Evaluate Same-origin Policy

Using the following URL => http://ga.example.com/, evaluate if origin policies are violated or honored. Fill in the "Results" and "Reasons" columns with the appropriate answer. We'll give you the first answer 😀

URL Results Reason
http://cnn.example.com/dir/other.html True is the same parent
http://ga.example.com/dir/anotherdir/foo.html True this is the same domain as
http://example.ga.com/dir/anotherdir/foo.html False ga is a different domain than example
https://ga.example.com/resume.html True This is the same domain and resume file we are retriving
ga.example.com/resume.html True reverts to http and so it is the same
http://ga.example.com:81/dir/etc.html False this is a different port
http://ga.example.com/dir2/other.html True the domain is the same as the original
http://ga.example.com:80/dir2/more.html True the domain is the same as the original
http://ga.example.edu False .edu is a different domain

Definition of done: Create a gist and send it to me and Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment