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

Commit

Permalink
fix: stop blocking bare v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinLiquid authored Jan 29, 2024
1 parent a1b1924 commit b8957ef
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,6 @@ server.on('request', (req, res) => {
res.setHeader('Access-Control-Allow-Headers', 'content-type')
res.setHeader('X-Proxy-Backend', 'FlowServer')

if (req.url?.includes('bare/v3')) {
res.writeHead(401, { 'Content-Type': 'application/json' })
res.write(JSON.stringify({
code: 401,
message: 'This request has been blocked.'
}))
res.end()

logger.debug(`${req.headers['x-forwarded-for'] || req.socket.remoteAddress} - ${req.method} "${req.url}" HTTP/${req.httpVersion} ${res.statusCode} ${req.socket.bytesRead}`)

return
}

logger.debug(`${req.headers['x-forwarded-for'] || req.socket.remoteAddress} - ${req.method} "${req.url}" HTTP/${req.httpVersion} ${res.statusCode} ${req.socket.bytesRead}`)

if (bare.shouldRoute(req)) {
Expand Down

0 comments on commit b8957ef

Please sign in to comment.