[PR #374] [MERGED] Web Server Improvements #578

Closed
opened 2026-02-25 23:34:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/374
Author: @efrecon
Created: 2/18/2022
Status: Merged
Merged: 2/19/2022
Merged by: @fmartingr

Base: masterHead: master


📝 Commits (7)

  • 2bdbf73 Fix for infinite redirect loop
  • 3623fb7 Add repo root independence
  • 1140c90 Add HTTP request logging
  • 2db17eb Fix proper RootPath handler
  • 7bc6d13 Add logging for all resources
  • a434c2c Report effective length of written data
  • aa35be8 Reformat

📊 Changes

5 files changed (+178 additions, -38 deletions)

View changed files

📝 .github/workflows/_buildx.yml (+2 -2)
📝 .github/workflows/version_bump.yml (+2 -2)
📝 internal/cmd/serve.go (+3 -0)
📝 internal/webserver/handler.go (+1 -0)
📝 internal/webserver/server.go (+170 -34)

📄 Description

This PR focuses on 3 things (sorry!):

  • It fixes issue #39 by passing directly the configured root path.
  • It adds access logging to the serve sub-command. All accesses, including errors, are logged through logrus at the info (success), or warn (error) levels. Lines provide information about the requests/response from the server. Logging is on by default, and can be turned on using the --log flag at the command-line.
  • It uses dynamic information from the github context when building and testing in the GitHub workflows. This facilitates for forks to properly run the workflows, as the resulting packages will be hosted within the fork's account.

Docker images corresponding to the content of this PR can be found within my fork


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/374 **Author:** [@efrecon](https://github.com/efrecon) **Created:** 2/18/2022 **Status:** ✅ Merged **Merged:** 2/19/2022 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (7) - [`2bdbf73`](https://github.com/go-shiori/shiori/commit/2bdbf731b63e743003c6b821d2d2766704b60717) Fix for infinite redirect loop - [`3623fb7`](https://github.com/go-shiori/shiori/commit/3623fb7c47535cd6e53ddb6ef5f68c07c976515b) Add repo root independence - [`1140c90`](https://github.com/go-shiori/shiori/commit/1140c908b1db1c73d93db7f85f5d8ba6f567acc9) Add HTTP request logging - [`2db17eb`](https://github.com/go-shiori/shiori/commit/2db17ebd7c4bf5a8709ead9ee862fcaf8de576b9) Fix proper RootPath handler - [`7bc6d13`](https://github.com/go-shiori/shiori/commit/7bc6d134aeb0df8ebf50c4a02baf117d9062553b) Add logging for all resources - [`a434c2c`](https://github.com/go-shiori/shiori/commit/a434c2c5dd6aaeae4debed722858485ae76ab646) Report effective length of written data - [`aa35be8`](https://github.com/go-shiori/shiori/commit/aa35be8952beb33bf45248e7be87ddc875ebf1e0) Reformat ### 📊 Changes **5 files changed** (+178 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/_buildx.yml` (+2 -2) 📝 `.github/workflows/version_bump.yml` (+2 -2) 📝 `internal/cmd/serve.go` (+3 -0) 📝 `internal/webserver/handler.go` (+1 -0) 📝 `internal/webserver/server.go` (+170 -34) </details> ### 📄 Description This PR focuses on 3 things (sorry!): + It fixes issue #39 by passing directly the configured root path. + It adds access logging to the `serve` sub-command. All accesses, including errors, are logged through [logrus](https://github.com/sirupsen/logrus) at the `info` (success), or `warn` (error) levels. Lines provide information about the requests/response from the server. Logging is on by default, and can be turned on using the `--log` flag at the command-line. + It uses dynamic information from the `github` context when building and testing in the GitHub workflows. This facilitates for forks to properly run the workflows, as the resulting packages will be hosted within the fork's account. Docker images corresponding to the content of this PR can be found within my [fork](https://github.com/efrecon/shiori/pkgs/container/shiori/15313411?tag=v1.5.0-95-ga434c2c) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#578
No description provided.