Skip to content

monmohan/cors-tutorial-practical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Step by Step Tutorial

  • The code in this repository is used to demonstrate CORS concepts like - Simple GET with Allow-Origin, requests needing pre-flight and handing credentials
  • Step by Step tutorial using this code is available as three part blog series
  • Part I
  • Part II
  • Part III

Running the demo

  • Download and install golang
  • Clone the repo git clone git@github.com:monmohan/cors-tutorial-practical.git
  • Running the Servers
    • Map couple of loopback interfaces to page and apiserver. For example here is my etc/hosts file
       127.0.0.2 pageserver.cors.com
       127.0.0.3 apiserver.cors.com
    
    • The servers can be run directly from the source
    • Change to the relevent directory
    • Type go run <filename>
  • Follow along the Blogs or play around with the code .

Have Fun !

About

Demonstrate different CORS scenarios (pre-flight etc.)

Resources

License

Stars

Watchers

Forks

Packages

No packages published