fix: migrate-to-v2

This commit is contained in:
Yuanzhe Liu
2023-05-02 01:47:56 +00:00
parent d01b716806
commit 9193fc3c7b
2 changed files with 23 additions and 23 deletions

View File

@@ -1,39 +1,39 @@
# fly.toml file generated for shy-field-2671 on 2022-11-07T23:03:33+08:00
# fly.toml app configuration file generated for shy-field-2671 on 2023-05-02T01:26:21Z
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "shy-field-2671"
primary_region = "sea"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
kill_timeout = "5s"
[experimental]
auto_rollback = true
[env]
PORT = "8080"
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
protocol = "tcp"
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[[services.ports]]
port = 80
handlers = ["http"]
force_https = true
[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.concurrency]
type = "connections"
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
grace_period = "1s"
restart_limit = 0

View File

@@ -18,7 +18,7 @@ const rateLimit = require('express-rate-limit');
const allowlist = ['::1', '::ffff:127.0.0.1'];
const apiLimiter = rateLimit({
windowMs: 5 * 60 * 1000, // 5 minute
max: 10, // limit each IP to 5 requests per windowMs
max: 5, // limit each IP to 5 requests per windowMs
message: 'Too many requests from this IP, please try again later',
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
skipFailedRequests: true, // Don't count failed requests (status >= 400)