mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-16 21:47:37 +08:00
✨ Feature(custom): allow localhost access for IPv6 in POST request handling
This commit is contained in:
@@ -91,7 +91,7 @@ class Server {
|
||||
const remoteAddress = request.socket.remoteAddress || 'unknown'
|
||||
logger.info('[PicList Server] get a POST request from IP:', remoteAddress)
|
||||
let urlSP = query ? new URLSearchParams(query) : undefined
|
||||
if (remoteAddress === '::1' || remoteAddress === '127.0.0.1') {
|
||||
if (remoteAddress === '::1' || remoteAddress === '127.0.0.1' || remoteAddress === '::ffff:127.0.0.1') {
|
||||
const serverKey = picgo.getConfig<string>(configPaths.settings.serverKey) || ''
|
||||
if (urlSP) {
|
||||
urlSP.set('key', serverKey)
|
||||
|
||||
Reference in New Issue
Block a user