Closed mcfearsome closed 5 years ago
Hi Jessie!
The quickest workaround here is to change where Easymon is mounted.
Easymon doesn't care about where it's mounted, we picked /up
because it didn't conflict with anything we were doing. So you could easily do something like this in your routes.rb
:
mount Easymon::Engine => '/health'
# or
mount Easymon::Engine => '/upz'
I don't have time to dig into this, but feel free to investigate and submit a PR if you solve your issue!
I'm closing this, feel free to re-open with a PR or new info!
In case anyone ends up here:
This seems to be fixed in Rails 5.2 (see https://github.com/rails/rails/pull/35162)
For version prior to 5.2, this is easily worked around by using a constraint:
mount Easymon::Engine => '/up', constraints: { path: /\/up(?:\/([a-zA-Z]*))?$/ }
I have a site where the following path is being picked up by easymon:
/uppababy-2018-cruz-stroller-emmett-green.html
In the site, this path is a 404, which should then get picked up by our error controller and redirected to a configured destination but it seems like easymon is picking it up before that.
It is unclear how the path is changing from
/uppababy-2018-cruz-stroller-emmett-green.html
to/up/pababy-2018-cruz-stroller-emmett-green.htm