Compare commits

..

16 Commits

Author SHA1 Message Date
phundrak 7fe75bb559 style: format code
Publish Docker Images / build-docker (push) Successful in 5m38s
Publish Docker Images / coverage-and-sonar (push) Successful in 9m35s
Publish Docker Images / push-docker (push) Successful in 37s
2026-06-02 01:50:31 +02:00
phundrak b6d7c50a38 chore(audit): deny wildcard versions in Cargo.toml 2026-06-02 01:50:31 +02:00
phundrak 002ff9a1c5 feat(RateLimit): add Retry-After header for 429 errors 2026-06-02 01:50:31 +02:00
phundrak 6bc14c7429 fix(health): move test to dedicated test mod 2026-06-02 01:50:31 +02:00
phundrak 03592c1e83 refactor(RateLimitConfig): replace magic values with struct method 2026-06-02 01:50:31 +02:00
phundrak 6199e73e59 feat(contact): sanitize user-submitted data 2026-06-02 01:50:31 +02:00
phundrak 3c65e1d83d fix: typo 2026-06-02 01:50:31 +02:00
phundrak 7294cd7651 feat(logs): only activate json or pretty logs one at a time 2026-06-02 01:50:31 +02:00
phundrak 123c0d17ed refactor: simplify code 2026-06-02 01:50:31 +02:00
phundrak 7e074888a6 fix(contact): sanatize user-supplied data in logs 2026-06-02 01:50:31 +02:00
phundrak 215ac75721 fix(logs): make tracing target consistent 2026-06-02 01:50:31 +02:00
phundrak 4d3432e92f refactor: better value cloning 2026-06-02 01:50:31 +02:00
phundrak e3aaf05838 fix(RateLimit): apply rate limiting based on client IP 2026-06-02 01:50:31 +02:00
phundrak bb4e230c0d feat(settings): proper CORS in production
If the backend starts in production mode with no `frontend_url` is set,
immediately panic and stop.
2026-06-02 01:50:31 +02:00
phundrak afd399b84f feat(SMTP): disallow unencrypted SMTP with credentials 2026-06-02 01:50:31 +02:00
phundrak b923f3bdb0 feat(OpenAPI): disable Swagger and OpenAPI specs in prod 2026-06-02 01:50:31 +02:00
+2 -2
View File
@@ -111,10 +111,10 @@ impl Application {
) )
.url_prefix("/api"); .url_prefix("/api");
let ui = api_service.swagger_ui(); let ui = api_service.swagger_ui();
let mut route = poem::Route::new().nest("/", ui); let mut route = poem::Route::new().nest("/api", api_service.clone());
if settings.debug { if settings.debug {
route = route route = route
.nest("/api", api_service.clone()) .nest("/", ui)
.nest("/specs", api_service.spec_endpoint_yaml()); .nest("/specs", api_service.spec_endpoint_yaml());
} }
route route