mirror of
https://github.com/tornadocash/ip-echo.git
synced 2024-11-21 17:36:55 +01:00
minor changes
This commit is contained in:
parent
ba0d8d5c6d
commit
c16f90f8c6
@ -1,10 +1,7 @@
|
|||||||
FROM node:11
|
FROM node:11
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "main.js"]
|
CMD ["node", "main.js"]
|
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# ip-echo
|
||||||
|
|
||||||
|
Returns ip and geo data of server that made the request
|
@ -2,7 +2,7 @@ version: '2'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
ip-echo:
|
ip-echo:
|
||||||
image: poma/ip-echo
|
image: peppersec/ip-echo
|
||||||
environment:
|
environment:
|
||||||
# VIRTUAL_HOST: ip.tornado.cash
|
# VIRTUAL_HOST: ip.tornado.cash
|
||||||
# LETSENCRYPT_HOST: ip.tornado.cash
|
# LETSENCRYPT_HOST: ip.tornado.cash
|
||||||
|
2
main.js
2
main.js
@ -4,7 +4,7 @@ const cors = require('cors')
|
|||||||
const app = express()
|
const app = express()
|
||||||
const port = 3000
|
const port = 3000
|
||||||
|
|
||||||
app.use(cors());
|
app.use(cors())
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
const ip = req.headers['x-real-ip'] || req.connection.remoteAddress
|
const ip = req.headers['x-real-ip'] || req.connection.remoteAddress
|
||||||
|
Loading…
Reference in New Issue
Block a user