Implementation of session management using cookies by Go.

Docker Version

> docker --version
Docker version 20.10.8, build 3967b7d



1. Setup Docker-Container

# (= docker-compose up --build -d)
> task build  

# (= docker-compose exec front go run main.go)
> task rf 

2. Access localhost:8081/login

3. Enter ID and password

If you submit the correct ID and password, a SessionID will be generated and redirected to /home. SessionID is stored in a cookie.

  • ID: test-id
  • password: test-password

Even if you transition to /login after login, if SessionID is present in the cookie, you will be redirected to /home.


View Github