Commit 63cbac9fee7c453d35a1f2d32846844a7e92e292

Authored by Georg Hopp
1 parent c81bacdd

I prefer to simply configure nginx to serve .well-known as static content.

1   -# Place all the behaviors and hooks related to the matching controller here.
2   -# All this logic will automatically be available in application.js.
3   -# You can use CoffeeScript in this file: http://coffeescript.org/
1   -// Place all the styles related to the Pages controller here.
2   -// They will automatically be included in application.css.
3   -// You can use Sass (SCSS) here: http://sass-lang.com/
1   -class PagesController < ApplicationController
2   - def letsencrypt
3   - render text: "key goes here..."
4   - end
5   -end
6   -# vim: set ts=2 sw=2:
1   -module PagesHelper
2   -end
1   -<h1>Pages#letsencrypt</h1>
2   -<p>Find me in app/views/pages/letsencrypt.html.erb</p>
1 1 Rails.application.routes.draw do
2   - get 'pages/letsencrypt'
3   -
4 2 get 'welcome/index'
5 3
6 4 # The priority is based upon order of creation: first created -> highest priority.
... ... @@ -9,10 +7,6 @@ Rails.application.routes.draw do
9 7 # You can have the root of your site routed with "root"
10 8 root 'welcome#index'
11 9
12   - # Static pages controller
13   - # controller for letsencrypt
14   - get '/.well-known/acme-challenge/:id' => 'pages#letsencrypt'
15   -
16 10 # Example of regular route:
17 11 # get 'products/:id' => 'catalog#view'
18 12
... ...
1   -require 'test_helper'
2   -
3   -class PagesControllerTest < ActionController::TestCase
4   - test "should get letsencrypt" do
5   - get :letsencrypt
6   - assert_response :success
7   - end
8   -
9   -end
Please register or login to post a comment