braidfs 0.0.122 → 0.0.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -133,11 +133,6 @@ async function main() {
|
|
|
133
133
|
|
|
134
134
|
if (req.url === '/favicon.ico') return
|
|
135
135
|
|
|
136
|
-
if (!['::ffff:127.0.0.1', '127.0.0.1', '::1'].includes(req.socket.remoteAddress)) {
|
|
137
|
-
res.writeHead(403, { 'Content-Type': 'text/plain' })
|
|
138
|
-
return res.end('Access denied: only accessible from localhost')
|
|
139
|
-
}
|
|
140
|
-
|
|
141
136
|
// Free the CORS
|
|
142
137
|
free_the_cors(req, res)
|
|
143
138
|
if (req.method === 'OPTIONS') return
|
|
@@ -200,7 +195,7 @@ async function main() {
|
|
|
200
195
|
res.writeHead(500, { 'Error-Message': '' + e })
|
|
201
196
|
res.end('' + e)
|
|
202
197
|
}
|
|
203
|
-
}).listen(config.port, () => {
|
|
198
|
+
}).listen(config.port, 'localhost', () => {
|
|
204
199
|
console.log(`daemon started on port ${config.port}`)
|
|
205
200
|
console.log('!! only accessible from localhost !!')
|
|
206
201
|
|