- Timestamp:
- Feb 11, 2024, 12:56:18 AM (16 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/INSTALL.md
r67 r68 2 2 3 3 ```shell 4 $ git clone https://git.chaotic.ninja/yakumo.izuru/mai4 $ git clone git://git.chaotic.ninja/yakumo_izuru/mai 5 5 $ cd mai 6 6 $ make … … 8 8 ``` 9 9 * Read the [mai.ini(5)](mai.ini.5) manual page 10 * Use any web server than is able to reverse proxy, like Apache, h2o, or NGINX.11 10 * Use any web server than is able to reverse proxy, like [Apache](https://httpd.apache.org), [h2o](https://h2o.examp1e.net), or [NGINX](https://www.nginx.com). 11 * Examples are provided on the repository -
trunk/cmd/mai/main.go
r67 r68 58 58 fiber.Config{ 59 59 AppName: "Mai", 60 ProxyHeader: fiber.HeaderXForwardedFor, 61 TrustedProxies: []string{"0.0.0.0/0"}, 60 62 ServerHeader: "Mai (using Fiber v2.x)", 61 63 Views: engine, … … 76 78 )) 77 79 78 app.Use(limiter.New()) 80 app.Use(limiter.New(limiter.Config{ 81 Max: 10, 82 Expiration: 180 * time.Second, 83 LimitReached: func(c *fiber.Ctx) error { 84 return c.SendStatus(429) 85 return c.SendFile(conf.tmplpath + "/429.html") 86 }, 87 })) 79 88 80 89 app.All("/", func(c *fiber.Ctx) error {
Note:
See TracChangeset
for help on using the changeset viewer.