Simple HTTP session checker
About
Simple HTTP session (cookie, redis) checker. By GET /incr, you will get the following response.
{"count":3,"hostname":"cf238ff21641"}
Count will increase each time you GET /incr depending on the session.
Installation
- Clone the repository:
$ git clone https://github.com/torumakabe/session-checker.git
$ cd session-checker
- Install dependencies:
$ go mod tidy
Usage
- Build the application:
$ make build
- Run the application:
$ ./bin/session-checker
Testing
Run the tests:
$ make test
Configuration
The application can be configured using environment variables or command-line flags:
--redis-server
or -r
: Set Redis server hostname:port.
--redis-password
or -p
: Set Redis password.
Environment variables:
SESSION_CHECKER_REDIS_SERVER
: Set Redis server hostname:port.
SESSION_CHECKER_REDIS_PASSWORD
: Set Redis password.