Skip to content

Commit

Permalink
IP Check 🥸
Browse files Browse the repository at this point in the history
  • Loading branch information
sivm99 committed Sep 20, 2024
1 parent 2151ffc commit 5f6f843
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
tags: |
${{ secrets.DOCKER_USERNAME }}/mail:latest
registry.gitlab.com/${{ secrets.GITLAB_USERNAME }}/oas-api:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64

- name: Logout from DockerHub
run: docker logout
Expand Down
3 changes: 3 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import rateLimit from "express-rate-limit";
import hpp from "hpp";
const app = express();

app.set('trust proxy', 1 /* number of proxies between user and server */)
app.get('/ip', (request, response) => response.send(request.ip))

app.use(helmet());
app.use(hpp());
app.use(cookieParser());
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onealias",
"version": "0.0.0.15.9",
"name": "oas-api",
"version": "0.0.0.20.9",
"description": "One Alias Service, Forward to your own main address",
"main": "server.js",
"type": "module",
Expand Down

0 comments on commit 5f6f843

Please sign in to comment.