Skip to content

proof of concept for sharing cookies between services on same domain but different port

Notifications You must be signed in to change notification settings

jpuckett-di/test-cookie-share

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Cookie Share

Proof of concept sharing cookies across different web services running on the same domain (localhost) but different ports.

API

Start the API on port 4000

cd api
php -S localhost:4000

Web

Start the web server on port 8000

cd web
python3 -m http.server 8000

Test

Visit the API in the browser setting whatever test value you want to see http://localhost:4000?testvar=shared-cookie

  1. API will set a cookie value on port 4000
  2. API will redirect to web server on port 8000
  3. JS on web page will read cookie value and print it on screen

About

proof of concept for sharing cookies between services on same domain but different port

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published