_debugbar being used without APP_URL context #1235

Closed
opened 2026-02-05 00:21:15 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @eresonance on GitHub (Jun 24, 2019).

Describe the bug
I'm running the docker version of bookstack (linuxserver/bookstack) and am running it in a context via a separate proxy server:

    APP_URL=http://host/bookstack/

Apache proxy config:

  ProxyPass        /bookstack http://otherhost:9020 nocanon
  ProxyPassReverse /bookstack http://otherhost:9020

Bookstack tries to grab files from http://host/_debugbar:

    http://host/_debugbar/assets/stylesheets?v=1560611520
    http://host/_debugbar/assets/javascript?v=1560611520

Which will return 404s.

Expected behavior
Should grab those files at paths under the bookstack/ context:

    http://host/bookstack/_debugbar/assets/stylesheets?v=1560611520
    http://host/bookstack/_debugbar/assets/javascript?v=1560611520

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v0.26.2
  • PHP Version: Not sure, comes with docker
  • Hosting Method (Nginx/Apache/Docker): Docker @ linuxserver/bookstack

I've worked around this by adding the following extra proxy rules:

  ProxyPass        /bookstack http://otherhost:9020 nocanon
  ProxyPassReverse /bookstack http://otherhost:9020
  ProxyPass        /_debugbar http://otherhost:9020/_debugbar nocanon
  ProxyPassReverse /_debugbar http://otherhost:9020/_debugbar
Originally created by @eresonance on GitHub (Jun 24, 2019). **Describe the bug** I'm running the docker version of bookstack (linuxserver/bookstack) and am running it in a context via a separate proxy server: ``` APP_URL=http://host/bookstack/ ``` Apache proxy config: ``` ProxyPass /bookstack http://otherhost:9020 nocanon ProxyPassReverse /bookstack http://otherhost:9020 ``` Bookstack tries to grab files from http://host/_debugbar: ``` http://host/_debugbar/assets/stylesheets?v=1560611520 http://host/_debugbar/assets/javascript?v=1560611520 ``` Which will return 404s. **Expected behavior** Should grab those files at paths under the `bookstack/` context: ``` http://host/bookstack/_debugbar/assets/stylesheets?v=1560611520 http://host/bookstack/_debugbar/assets/javascript?v=1560611520 ``` **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v0.26.2 - PHP Version: Not sure, comes with docker - Hosting Method (Nginx/Apache/Docker): Docker @ linuxserver/bookstack I've worked around this by adding the following extra proxy rules: ``` ProxyPass /bookstack http://otherhost:9020 nocanon ProxyPassReverse /bookstack http://otherhost:9020 ProxyPass /_debugbar http://otherhost:9020/_debugbar nocanon ProxyPassReverse /_debugbar http://otherhost:9020/_debugbar ```
OVERLORD added the 🐛 Bug:octocat: Admin/Meta🏭 Back-End labels 2026-02-05 00:21:15 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 24, 2019):

Thanks for reporting @eresonance,
The debugbar is not really something intended to be in production or officially supported. The behavior where it was auto-enabled when in debug mode was not really intended and has now been updated to be disabled by default. That said, while I was there, I have updated the config so the debugbar should take APP_URL into account.

If wanted, the debugbar can be enabled via setting DEBUGBAR_ENABLED=true in the .env file.

These updates will be in the next release.

@ssddanbrown commented on GitHub (Jun 24, 2019): Thanks for reporting @eresonance, The debugbar is not really something intended to be in production or officially supported. The behavior where it was auto-enabled when in debug mode was not really intended and has now been updated to be disabled by default. That said, while I was there, I have updated the config so the debugbar should take APP_URL into account. If wanted, the debugbar can be enabled via setting `DEBUGBAR_ENABLED=true` in the `.env` file. These updates will be in the next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1235