Skip to content

Alchemy doesn't respect RAILS_RELATIVE_URL_ROOT #2296

@dssjoblom

Description

@dssjoblom

Steps to reproduce

Configure Rails with a relative URL root. https://guides.rubyonrails.org/configuring.html#deploy-to-a-subdirectory-relative-url-root

Expected behavior

Alchemy should only use URLs with the specified root.

Actual behavior

The preview window attempts to access the non-relative root /. For example, assume RAILS_RELATIVE_URL_ROOT is "/subdir" and Alchemy is mounted on "cms". The preview will then attempt to load e.g. /cms/admin/pages/1, which doesn't exist, while it should instead load /subdir/cms/admin/pages/1. It is possible this same issue is present in other parts of the code as well.

System configuration

  • Alchemy Version: 6.0.0-rc6
  • Rails Version: 6.1.4.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions