Skip to content

Commit

Permalink
optional rate_limit directives for caddy
Browse files Browse the repository at this point in the history
  • Loading branch information
Athlon1600 committed May 1, 2024
1 parent c1b8f1f commit 2c67edb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion backend/etc/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
# debug
admin off
# order rate_limit before reverse_proxy
}

notepad.mx {
Expand All @@ -11,11 +12,14 @@ notepad.mx {
max_size 1MB
}

# cannot save more than once every 800 ms anyways
# rate_limit /api* {remote.ip} 60r/m

# https://hstspreload.org/
# header Strict-Transport-Security max-age=31536000; includeSubDomains; preload

root * ./backend/public
file_server
file_server browse

reverse_proxy /api/* localhost:3000 {
header_down -Server
Expand Down
3 changes: 2 additions & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Web-based notepad that makes it easy and secure to stores your notes online. No registration needed."/>
<meta name="description" content="Web-based Notepad with automatic encryption. No registration needed. Maximum privacy."/>
<meta name="keywords" content="simplenote alternative, standard notes alternative">
<meta name="author" content="Athlon1600">
<title>Online Notepad - store your notes securely online</title>
</head>
<body>
Expand Down

0 comments on commit 2c67edb

Please sign in to comment.