Describe the bug
Sinatra 4.1.0 adds host authorization by default in development mode.
This means that if you use a non-default domain in development, you'll get a ‘Host not permitted’ error when trying to visit the Split dashboard.
To Reproduce
Steps to reproduce the behavior:
- Configure Split and mount the dashboard as usual (make sure that Sinatra >= 4.1.0 gets installed)
- Add a custom domain to the permitted hosts in Rails (for example
config.hosts << "127.0.0.1.nip.io:3000") - Visit
127.0.0.1.nip.io:3000/split - You should see a
Host not permitted error
Expected behavior
The host authorization middleware should probably be configurable through the Split configuration.
Additional context
This monkey patch is a workaround for the moment:
require'split/dashboard'classSplit::Dashboardset:host_authorization,{permitted_hosts: ["127.0.0.1.nip.io"]}end
Describe the bug
Sinatra 4.1.0 adds host authorization by default in development mode.
This means that if you use a non-default domain in development, you'll get a ‘Host not permitted’ error when trying to visit the Split dashboard.
HostAuthorizationrack-protection middleware sinatra/sinatra#2053To Reproduce
Steps to reproduce the behavior:
config.hosts << "127.0.0.1.nip.io:3000")127.0.0.1.nip.io:3000/splitHost not permittederrorExpected behavior
The host authorization middleware should probably be configurable through the Split configuration.
Additional context
This monkey patch is a workaround for the moment: