We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d79ac95 commit aeade2aCopy full SHA for aeade2a
src/index.ts
@@ -60,6 +60,12 @@ app.put('/deploy', async (c) => {
60
return c.text('Invalid filename', 400)
61
}
62
63
+ const forwardedFor = c.req.header('x-forwarded-for')
64
+ const realIp = c.req.header('x-real-ip') ?? c.req.header("cf-connecting-ip")
65
+ const remoteAddress = (c.req.raw as { socket?: { remoteAddress?: string } }).socket?.remoteAddress
66
+ const remoteHost = forwardedFor || realIp || remoteAddress || 'unknown'
67
+ console.log(`Accepted ${filename} from ${remoteHost}`)
68
+
69
const location = config.locations[token]
70
try {
71
const targetPath = await resolveTargetPath(location, filename)
0 commit comments