Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rails 5.2.3 got "no route error" on /.well-known #79

Open
JackiMode opened this issue Apr 25, 2019 · 2 comments
Open

rails 5.2.3 got "no route error" on /.well-known #79

JackiMode opened this issue Apr 25, 2019 · 2 comments

Comments

@JackiMode
Copy link

JackiMode commented Apr 25, 2019

Please use markdown formatting for code, configuration or console output.

1. Expected behavior

2.6.1 :001 > r = Rails.application.routes
 => #<ActionDispatch::Routing::RouteSet:0x00005649b37e8a58>
2.6.1 :002 > r.recognize_path "/.well-known/acme-challenge/lyQnV4QydflZ6px3YqoaFQupRAOeew69SSMv27nBRkc"
 => {:controller=>"acme_plugin/application", :action=>"index", :challenge=>"lyQnV4QydflZ6px3YqoaFQupRAOeew69SSMv27nBRkc"}

2. Actual behavior

Loading production environment (Rails 5.2.3)
2.6.1 :001 > r = Rails.application.routes
 => #<ActionDispatch::Routing::RouteSet:0x00005637a8726a38>
2.6.1 :002 > r.recognize_path "/.well-known/acme-challenge/lyQnV4QydflZ6px3YqoaFQupRAOeew69SSMv27nBRkc"
Traceback (most recent call last):
        1: from (irb):2
ActionController::RoutingError (No route matches "/.well-known/acme-challenge/lyQnV4QydflZ6px3YqoaFQupRAOeew69SSMv27nBRkc")

3. Steps to reproduce issue

install gem rails 5.2.3

4. Your configuration (ruby, rails version, your Gemifile and Gemfile.lock files etc.)

rails 5.2.3, ruby 2.6.1

downgrading to rails 5.2.0 solves problem

@rounders
Copy link

Am also seeing this on rails 5.2.3

@rounders
Copy link

A workaround is to add the following route directly to your rails project:

get '.well-known/acme-challenge/:challenge' => 'acme_plugin/application#index'

For some reason any route that start with a period doesn't get picked up correctly when defined in a rails engine at the moment but they still work fine when added directly to your project routes.rb file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants