Proxy Authentication Wall to protect other websites
- TypeScript 90.2%
- JavaScript 4.1%
- EJS 3.9%
- Dockerfile 0.8%
- Shell 0.7%
- Other 0.3%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| hooks | ||
| src | ||
| test | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| jest-env.ts | ||
| jest.config.ts | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| renovate.json | ||
| tsconfig.json | ||
| webpack.config.ts | ||
Preauth Proxy
Running the Application
Using Docker
- Basic Command:
Execute the following command to run the container:
docker run -it --rm -p 3000:3000 timedin/preauth-proxy:latest - With .env file:
If you have a .env file with your environment variables, use the following command:
docker run --env-file .env -it --rm -p 3000:3000 timedin/preauth-proxy:latest
Using Docker Compose
- Download the docker-compose.yml
- Set the environment variables to your configuration
- Run the following command to start the stack:
docker compose up -d
Downloading Prebuilt Version
- Download the complete build from the release page
- Extract the files
- Set your environment variables according to Configuration section
- Start the server using the following command:
node ./dist/server/index.js
Configuration
Following environment variables are used for config
JWT_SECRETRandom secret for JWT loggedin token (required!)USERSJSON-Array of users and passwords allowed (required!) | Example:[{"username":"user1", "password": "pass1"}]ROUTESRoutes for Proxy (required!) | Example:[{"host":"example.com", "target":"http://localhost:3000"}]
Optional Config:HOSTHost/Interface of the webserver to listen on (default and when dockerized: 0.0.0.0)PORTPort of the webserver for frontend and backend (default 3000)DOMAINDomain for cookie for subdomain wide access (no default)COOKIE_SECURESet cookies to https only (default false)COOKIE_SAMESITESet cookies for cross-originALLOWED_ORIGINSSemicolon (;) seperated list of CORS Domains OR *