mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-04 03:42:29 +00:00
Log proxy default requests
This commit is contained in:
parent
deedd83fc6
commit
fd49e063f6
@ -47,7 +47,14 @@ forEach(hostnameRoutes, (target, host) => {
|
||||
const handler = createProxyMiddleware({
|
||||
target: `http://localhost:${DAEMON_PORT()}`,
|
||||
})
|
||||
app.all(`*`, handler)
|
||||
app.all(`*`, (req, res, next) => {
|
||||
const method = req.method
|
||||
const fullUrl = req.protocol + '://' + req.get('host') + req.originalUrl
|
||||
|
||||
console.log(`${method} ${fullUrl} -> ${`http://localhost:${DAEMON_PORT()}`}`)
|
||||
|
||||
handler(req, res, next)
|
||||
})
|
||||
|
||||
if (IS_DEV()) {
|
||||
http.createServer(app).listen(80, () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user