1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-04-21 13:39:45 +03:00
mox/http
Mechiel Lukkien 3e128d744e
for the web interfaces, ensure the effective configured http paths end in a slash to prevent 404's and/or errors accessing the web interfaces
The default paths for the web interfaces, such as /admin/, /account/, /webmail/
and /webapi/ end with a slash. They should end with a slash because we use the
path when restricting cookies to just that web interface. You could configure
paths not ending with a slash, but due to using http.StripPrefix, and our
handler, some of those requests may not work properly.

We now warn if configured paths don't end with a trailing slash when parsing
the config file. We normally error out when such things happen, but users
probably have paths without trailing slashes configured, and we don't want to
break them on a future upgrade. We now use an effective path that includes the
trailing slash.

We would always redirect requests to the configured paths but without trailing
slash to the path with trailing slash, and that stays.

For issue  by odama626.
2025-03-29 22:00:55 +01:00
..
atime.go make mox compile on windows, without "mox serve" but with working "mox localserve" 2023-10-14 10:54:07 +02:00
atime_bsd.go make mox compile on windows, without "mox serve" but with working "mox localserve" 2023-10-14 10:54:07 +02:00
atime_windows.go make mox compile on windows, without "mox serve" but with working "mox localserve" 2023-10-14 10:54:07 +02:00
autoconf.go check and log errors more often in deferred cleanup calls, and log remote-induced errors at lower priority 2025-03-24 14:06:05 +01:00
autoconf_test.go mox! 2023-01-30 14:27:06 +01:00
favicon.ico don't prevent the html pages to load a favicon, and provide one by default 2024-07-08 21:58:10 +02:00
gzcache.go replace packages slog and slices from golang.org/x/exp with stdlib 2024-02-08 14:49:01 +01:00
main_test.go Fail tests if unhandled panics happened. 2025-03-06 11:35:43 +01:00
mobileconfig.go update to go1.23 and replace golang.org/x/exp/maps with stdlib maps 2025-03-28 17:01:06 +01:00
mtasts.go use new sherpadoc rename mechanism to remove some typename stuttering 2024-04-19 10:51:24 +02:00
mtasts_test.go mox! 2023-01-30 14:27:06 +01:00
web.go for the web interfaces, ensure the effective configured http paths end in a slash to prevent 404's and/or errors accessing the web interfaces 2025-03-29 22:00:55 +01:00
web_test.go Add support for negotiating IMAP and SMTP on the HTTPS port 443 using TLS ALPN "imap" and "smtp" 2025-01-23 11:16:20 +01:00
webserver.go check and log errors more often in deferred cleanup calls, and log remote-induced errors at lower priority 2025-03-24 14:06:05 +01:00
webserver_test.go improve http request handling for internal services and multiple domains 2024-05-11 11:13:14 +02:00