Skip to content
This repository was archived by the owner on Apr 21, 2024. It is now read-only.

Commit b8957ef

Browse files
authored
fix: stop blocking bare v3
1 parent a1b1924 commit b8957ef

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/index.js

-13
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@ server.on('request', (req, res) => {
2828
res.setHeader('Access-Control-Allow-Headers', 'content-type')
2929
res.setHeader('X-Proxy-Backend', 'FlowServer')
3030

31-
if (req.url?.includes('bare/v3')) {
32-
res.writeHead(401, { 'Content-Type': 'application/json' })
33-
res.write(JSON.stringify({
34-
code: 401,
35-
message: 'This request has been blocked.'
36-
}))
37-
res.end()
38-
39-
logger.debug(`${req.headers['x-forwarded-for'] || req.socket.remoteAddress} - ${req.method} "${req.url}" HTTP/${req.httpVersion} ${res.statusCode} ${req.socket.bytesRead}`)
40-
41-
return
42-
}
43-
4431
logger.debug(`${req.headers['x-forwarded-for'] || req.socket.remoteAddress} - ${req.method} "${req.url}" HTTP/${req.httpVersion} ${res.statusCode} ${req.socket.bytesRead}`)
4532

4633
if (bare.shouldRoute(req)) {

0 commit comments

Comments
 (0)