Refresh deploy/ and bin/ from the boilerplate at 09e144d (the release split between the distro and Windows, wsl-setup, the server config, USER 1000, python:3.15-slim) with roledesk's facts put back: no frontend stage, desk, plugins and seed copied, the extras passkeys, embeddings and llm, roles as the table the backup and the importer require, bin/pull.sh and bin/worker.sh with their profile commands, and Install Server.md and Install WSL.md as copies in place of the five old deployment docs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
83e965dfeb
commit
a1f281a23a
40 files changed
+2226
-1287
No files matched your search
@@ -3,7 +3,7 @@
|
||||
##
|
||||
## The subdomain has to exist before this does anything: add <app> to SWAG's
|
||||
## SUBDOMAINS (or run it with a wildcard cert) and point the DNS record at the
|
||||
## same address as the rest of the stack. See docs/hosting.md.
|
||||
## same address as the rest of the stack. See docs/Install Server.md.
|
||||
|
||||
## Per-IP throttle for the login endpoints, if the app has a password. Declared
|
||||
## here at `http` scope — SWAG includes proxy-confs outside any server block,
|
||||
@@ -15,23 +15,30 @@ server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
server_name app.rittershofer.org;
|
||||
server_name app.example.com;
|
||||
|
||||
include /config/nginx/ssl.conf;
|
||||
# Put proxy defaults at server scope so location timeouts override them
|
||||
# through inheritance, rather than duplicate directives from proxy.conf.
|
||||
include /config/nginx/proxy.conf;
|
||||
|
||||
# 0 is no limit. Set a real one if strangers can post to this app; leave it
|
||||
# off when the only uploads are yours and can be large.
|
||||
client_max_body_size 0;
|
||||
# nginx buffers a request body to disk before it hands it on, and the login
|
||||
# takes one without a session, so no limit here lets anyone spool gigabytes.
|
||||
# This is small. A route that takes a large upload gets its own
|
||||
# `location = /path { client_max_body_size 0; proxy_request_buffering off;
|
||||
# ... }` above `location /`, with the same proxy lines as below; streaming
|
||||
# the body lets the app refuse a request without a session before nginx
|
||||
# has stored any of it.
|
||||
client_max_body_size 1m;
|
||||
|
||||
# Guessing the password is already pointless if the app locks out after a
|
||||
# handful of wrong answers (see docs/password-protection.md). This is the
|
||||
# handful of wrong answers (see auth/README.md). This is the
|
||||
# cheap half of the rest: attempts are slowed per address, at the proxy,
|
||||
# before they reach the app at all. `burst=5 nodelay` lets a person who
|
||||
# fat-fingers it a few times through immediately and then holds the rate.
|
||||
location ~ ^/login(/passkey)?$ {
|
||||
# `/login/passkey/options` is open and writes a challenge row per call, so
|
||||
# it is throttled with the two routes that check a credential.
|
||||
location ~ ^/login(/passkey(/options)?)?$ {
|
||||
limit_req zone=app_login burst=5 nodelay;
|
||||
limit_req_status 429;
|
||||
|
||||
|
||||
Reference in new issue
Block a user