diff options
| author | Ben Busby <contact@benbusby.com> | 2025-01-29 12:39:10 -0700 |
|---|---|---|
| committer | Ben Busby <contact@benbusby.com> | 2025-01-29 12:39:10 -0700 |
| commit | 6682d5c59a99f1c34d4905e859a9a77fa7c25f77 (patch) | |
| tree | e9ebb3fdbc22e601bbdb08442417e59cb6bf9c87 /server | |
| parent | f140cdfd6680c661afc510ece4eda28647238e88 (diff) | |
| download | farside-6682d5c59a99f1c34d4905e859a9a77fa7c25f77.tar.gz | |
Update "last updated" time when fetching from primary node
Fetches from the primary farside node were not updating the "last
updated" time, and would only show a placeholder UTC timestamp.
Diffstat (limited to 'server')
| -rw-r--r-- | server/server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go index 74bfa6c..a002662 100644 --- a/server/server.go +++ b/server/server.go @@ -79,6 +79,10 @@ func routing(w http.ResponseWriter, r *http.Request, jsEnabled bool) { path := strings.TrimPrefix(url.Path, "/") segments := strings.Split(path, "/") + if len(segments[0]) == 0 { + http.Redirect(w, r, "", http.StatusTemporaryRedirect) + } + target, err := services.MatchRequest(segments[0]) if err != nil { log.Printf("Error during match request: %v\n", err) |
