Broken image URL's when switching from http to https #1743

Closed
opened 2026-02-05 01:45:30 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @JHenneberg on GitHub (May 20, 2020).

Describe the bug
Broken image URL's when switching from http to https

Steps To Reproduce
Steps to reproduce the behavior:

  1. insert image in bookstack
  2. change the APP_URL from http to https or vica versa
  3. image url is broken because switch from http to https is neglected

Expected behavior
adjusting the urls of images automatically depending on APP_URL

Your Configuration (please complete the following information):

  • Exact BookStack Version : 29.1
  • PHP Version: 7.4.5
  • Hosting Method (Nginx/Apache/Docker): Docker
Originally created by @JHenneberg on GitHub (May 20, 2020). **Describe the bug** Broken image URL's when switching from `http` to `https` **Steps To Reproduce** Steps to reproduce the behavior: 1. insert image in bookstack 2. change the `APP_URL` from `http` to `https` or vica versa 3. image url is broken because switch from `http` to `https` is neglected **Expected behavior** adjusting the urls of images automatically depending on `APP_URL` **Your Configuration (please complete the following information):** - Exact BookStack Version : 29.1 - PHP Version: 7.4.5 - Hosting Method (Nginx/Apache/Docker): Docker
Author
Owner

@ssddanbrown commented on GitHub (May 21, 2020):

Hi @JHenneberg,

There is a built-in command that can be used for this scenario:

# Update a URL in the database content of your BookStack instance.
# Searches for <oldUrl> and replaces it with <newUrl>
php artisan bookstack:update-url <oldUrl> <newUrl>
# Example:
php artisan bookstack:update-url http://docs.example.com https://demo.bookstackapp.com
@ssddanbrown commented on GitHub (May 21, 2020): Hi @JHenneberg, There is a built-in command that can be used for this scenario: ```bash # Update a URL in the database content of your BookStack instance. # Searches for <oldUrl> and replaces it with <newUrl> php artisan bookstack:update-url <oldUrl> <newUrl> # Example: php artisan bookstack:update-url http://docs.example.com https://demo.bookstackapp.com ```
Author
Owner

@JHenneberg commented on GitHub (May 21, 2020):

Hey, yeah it's written in the documentary as well. Thank you.

@JHenneberg commented on GitHub (May 21, 2020): Hey, yeah it's written in the documentary as well. Thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1743