Voyager RU
  • Вступление
  • С чего начать
    • Что такое Voyager
    • Требования
    • Установка
    • Upgrading
    • Конфигурации
  • BREAD
    • Введение
    • Отношения
    • Поля форм
      • Флажки (Checkbox)
      • Координаты
      • Дата и время
      • Выпадающий список (Dropdown)
      • Изображения
      • Загрузка файлов (Media Picker)
      • Ввод чисел (Number)
      • TinyMCE
  • Основные концепции
    • Маршрутизация
    • Медиа-менеджер
    • Меню и конструктор меню
    • Управление базой данных
    • Настройки
    • Навигатор (Compass)
    • Роли и разрешения
    • Helper methods
    • Многоязычность
  • Персонализация
    • Переопределение файлов
    • Переопределение маршрутов
    • Additional CSS and JS
    • Enabling Soft-Delete
    • Custom relationship attributes
    • Adding custom Formfields
    • Coordinates
    • BREAD accessors
    • custom-guard
    • Action buttons
  • troubleshooting
    • Using HTTPS on yours site
    • Missing required parameter
Powered by GitBook
On this page

Was this helpful?

  1. troubleshooting

Using HTTPS on yours site

Symptom: When visiting your site with HTTPS, images within Voyager fail to load.

Cause: Images urls are generated by Voyager using

Storage::disk(config('voyager.storage.disk'))->url($file);

If voyager.storage.disk is set to public, and the public disk is the default from Laravel, then the url property in the disk configuration is set to

'url' => env('APP_URL').'/storage',

which uses the non-HTTPS APP_URL value to build an absolute url to the image.

Solution: If you remove env('APP_URL'). from the public disk configuration, then it will render a domain-relative url, which will always use the current domain and protocol.

As an aside, if you need a fully-qualified URL, you could wrap the call to Voyager::image('...') with asset(), so it would be

asset(Voyager::image('...'))

This will return the current protocol, domain, and correct path to that image.

PreviousAction buttonsNextMissing required parameter

Last updated 4 years ago

Was this helpful?