Commit Graph
5 Commits
Author SHA1 Message Date
Olivier Meunier b41f8f0398 Migrated emails generation to templ
- More context aware API
- Basic template with Readeck's logo
- Minor improvements to the message's CSS

The mail API provides a way to send MD messages and HTML message using
a component.
Existing, translatable, messages have been preserved to ease the
translators' burden.
2026-05-04 11:23:30 +02:00
Olivier Meunier e2b377b5cf A null remote IP address is always trusted.
A request made through a socket has a RemoteAddr "@", which is parsed
as a nil net.IP. This address is trusted when setting the real IP
address.
2025-12-08 07:01:54 +01:00
Olivier Meunier 36a6110ed4 Enable TLS certificate
This introduces configuration values that enable TLS on Readeck's http
server.

Once a certificate and a key file are provided, Readeck starts as an
HTTPS server and enables HTTP/2 as well.

Configuration values and environment variables are:

- server.cert_file / READECK_SERVER_CERT_FILE
- server.key_file  / READECK_SERVER_KEY_FILE

Resolves #154
2025-09-16 09:56:13 +02:00
Olivier Meunier e16cef67cd Add request ID to http.request.InitRequest middleware.
This replaces Chi's RequestID middleware and build a request ID that
doesn't leak the hostname. The ID's format is:
{host-checksum}/{rand}-{seq} where each value is an hex string.

See #733 https://codeberg.org/readeck/readeck/issues/733#issuecomment-5995702
2025-08-13 14:03:02 +02:00
Olivier Meunier 840636bc7f Introducing pkg/http/request
This package provides the needed blocks to add a proper request's URL
to the context, as well as the actual and "real" remote address.

It takes care of allowed proxies. It only changes the request.URL's
scheme and host.

We still change the request.URL to avoid a massive refactor but we leave
other request's property untouched.
2025-07-02 19:04:25 +02:00