···1111 "github.com/rs/zerolog"
1212)
13131414-// getClientIP extracts the real client IP address from the request,
1414+// GetClientIP extracts the real client IP address from the request,
1515// checking X-Forwarded-For and X-Real-IP headers for reverse proxy setups.
1616-func getClientIP(r *http.Request) string {
1616+func GetClientIP(r *http.Request) string {
1717 // Check X-Forwarded-For header (can contain multiple IPs: client, proxy1, proxy2)
1818 if xff := r.Header.Get("X-Forwarded-For"); xff != "" {
1919 // Take the first IP (the original client)
···7373 Str("query", r.URL.RawQuery).
7474 Int("status", rw.statusCode).
7575 Dur("duration", duration).
7676- Str("client_ip", getClientIP(r)).
7676+ Str("client_ip", GetClientIP(r)).
7777 Str("user_agent", r.UserAgent()).
7878 Int64("bytes_written", rw.bytesWritten).
7979 Str("proto", r.Proto)
+1-2
internal/middleware/security.go
···179179func RateLimitMiddleware(config *RateLimitConfig) func(http.Handler) http.Handler {
180180 return func(next http.Handler) http.Handler {
181181 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
182182- ip := getClientIP(r)
182182+ ip := GetClientIP(r)
183183 path := r.URL.Path
184184185185 var limiter *RateLimiter
···205205 }
206206}
207207208208-// getClientIP is defined in logging.go
209208210209// RequireHTMXMiddleware ensures that certain API routes are only accessible via HTMX requests.
211210// This prevents direct browser access to internal API endpoints that return fragments or JSON.
+6-3
module.nix
···146146 host = lib.mkOption {
147147 type = lib.types.str;
148148 default = "";
149149- description = "SMTP server hostname. Can also be set via SMTP_HOST in an environment file.";
149149+ description =
150150+ "SMTP server hostname. Can also be set via SMTP_HOST in an environment file.";
150151 example = "smtp.example.com";
151152 };
152153153154 port = lib.mkOption {
154155 type = lib.types.nullOr lib.types.port;
155156 default = null;
156156- description = "SMTP server port. Can also be set via SMTP_PORT in an environment file. Defaults to 587 if unset.";
157157+ description =
158158+ "SMTP server port. Can also be set via SMTP_PORT in an environment file.";
157159 };
158160159161 from = lib.mkOption {
160162 type = lib.types.str;
161163 default = "";
162162- description = "Sender address for outgoing email. Can also be set via SMTP_FROM in an environment file.";
164164+ description =
165165+ "Sender address for outgoing email. Can also be set via SMTP_FROM in an environment file.";
163166 example = "noreply@arabica.example.com";
164167 };
165168 };