mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-26 12:16:13 +01:00
feat: bun support 🥟 (#907)
* feat: bun 🥟
* check if playwright/linux workflow is fixed
* fix: backend issues exposed by bun
* feat: update scripts for bun
This commit is contained in:
parent
a9215ed9ce
commit
75be9a3279
11 changed files with 33 additions and 13 deletions
|
|
@ -9,7 +9,7 @@ const errorController = require('./controllers/ErrorController');
|
|||
const passport = require('passport');
|
||||
const configureSocialLogins = require('./socialLogins');
|
||||
|
||||
const port = process.env.PORT || 3080;
|
||||
const port = Number(process.env.PORT) || 3080;
|
||||
const host = process.env.HOST || 'localhost';
|
||||
const projectPath = path.join(__dirname, '..', '..', 'client');
|
||||
const { jwtLogin, passportLogin } = require('../strategies');
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ const loginLimiter = rateLimit({
|
|||
windowMs,
|
||||
max,
|
||||
message: `Too many login attempts from this IP, please try again after ${windowInMinutes} minutes.`,
|
||||
keyGenerator: function (req) {
|
||||
// Strip out the port number from the IP address
|
||||
return req.ip.replace(/:\d+[^:]*$/, '');
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = loginLimiter;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ const registerLimiter = rateLimit({
|
|||
windowMs,
|
||||
max,
|
||||
message: `Too many accounts created from this IP, please try again after ${windowInMinutes} minutes`,
|
||||
keyGenerator: function (req) {
|
||||
// Strip out the port number from the IP address
|
||||
return req.ip.replace(/:\d+[^:]*$/, '');
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = registerLimiter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue