[PR #3364] [MERGED] Updated custom request overrides to better match original intent #6182

Closed
opened 2026-02-05 10:26:22 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3364
Author: @ssddanbrown
Created: 4/2/2022
Status: Merged
Merged: 4/24/2022
Merged by: @ssddanbrown

Base: developmentHead: app_url_requests


📝 Commits (3)

  • 4dce03c Updated custom request overrides to better match original intent
  • 25654b2 Fixed base URL starting slash usage
  • 56254bd Added testing for our request method overrides

📊 Changes

3 files changed (+61 additions, -30 deletions)

View changed files

📝 app/Http/Request.php (+24 -8)
tests/Unit/UrlTest.php (+0 -22)
tests/UrlTest.php (+37 -0)

📄 Description

This updates the custom Request handler to provide only the scheme and host on the getSchemeAndHttpHost call, instead of providing the whole APP_URL value, while adding an override to the 'getBaseUrl' to use the APP_URL content instead of the guessed/detected Symfony value.

Untested apart from simple local setup.

Related to #2765

Testing Plan

We'd need to test a variety of environments this may affect. All as a sub-path:

  • Nginx proxy to docker.
  • Apache proxy to docker.
  • Nginx proxy to self.
  • Apache subdirectory alias.

Docs Update

Should hopefully not affect anyone but might be prudent to add an update warning just in case it has side affects in some specific scenarios.


🔄 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/BookStackApp/BookStack/pull/3364 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 4/2/2022 **Status:** ✅ Merged **Merged:** 4/24/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `app_url_requests` --- ### 📝 Commits (3) - [`4dce03c`](https://github.com/BookStackApp/BookStack/commit/4dce03c0d3747788bd716fcedb7564bfedce7598) Updated custom request overrides to better match original intent - [`25654b2`](https://github.com/BookStackApp/BookStack/commit/25654b232214583f06aef0a4edfc28815b66b735) Fixed base URL starting slash usage - [`56254bd`](https://github.com/BookStackApp/BookStack/commit/56254bdb66678ea69f70c95a3262d575dae03e11) Added testing for our request method overrides ### 📊 Changes **3 files changed** (+61 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Request.php` (+24 -8) ➖ `tests/Unit/UrlTest.php` (+0 -22) ➕ `tests/UrlTest.php` (+37 -0) </details> ### 📄 Description This updates the custom Request handler to provide only the scheme and host on the `getSchemeAndHttpHost` call, instead of providing the whole APP_URL value, while adding an override to the 'getBaseUrl' to use the APP_URL content instead of the guessed/detected Symfony value. Untested apart from simple local setup. Related to #2765 ### Testing Plan We'd need to test a variety of environments this may affect. All as a sub-path: - [x] Nginx proxy to docker. - [x] Apache proxy to docker. - [x] Nginx proxy to self. - [x] Apache subdirectory alias. ### Docs Update Should hopefully not affect anyone but might be prudent to add an update warning just in case it has side affects in some specific scenarios. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:26:22 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6182