- 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
- 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 !