Browse Source

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

master
Georg Hopp 10 years ago
parent
commit
63cbac9fee
  1. 3
      app/assets/javascripts/pages.coffee
  2. 3
      app/assets/stylesheets/pages.scss
  3. 6
      app/controllers/pages_controller.rb
  4. 2
      app/helpers/pages_helper.rb
  5. 2
      app/views/pages/letsencrypt.html.erb
  6. 6
      config/routes.rb
  7. 9
      test/controllers/pages_controller_test.rb

3
app/assets/javascripts/pages.coffee

@ -1,3 +0,0 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/stylesheets/pages.scss

@ -1,3 +0,0 @@
// Place all the styles related to the Pages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

6
app/controllers/pages_controller.rb

@ -1,6 +0,0 @@
class PagesController < ApplicationController
def letsencrypt
render text: "key goes here..."
end
end
# vim: set ts=2 sw=2:

2
app/helpers/pages_helper.rb

@ -1,2 +0,0 @@
module PagesHelper
end

2
app/views/pages/letsencrypt.html.erb

@ -1,2 +0,0 @@
<h1>Pages#letsencrypt</h1>
<p>Find me in app/views/pages/letsencrypt.html.erb</p>

6
config/routes.rb

@ -1,6 +1,4 @@
Rails.application.routes.draw do Rails.application.routes.draw do
get 'pages/letsencrypt'
get 'welcome/index' get 'welcome/index'
# The priority is based upon order of creation: first created -> highest priority. # The priority is based upon order of creation: first created -> highest priority.
@ -9,10 +7,6 @@ Rails.application.routes.draw do
# You can have the root of your site routed with "root" # You can have the root of your site routed with "root"
root 'welcome#index' root 'welcome#index'
# Static pages controller
# controller for letsencrypt
get '/.well-known/acme-challenge/:id' => 'pages#letsencrypt'
# Example of regular route: # Example of regular route:
# get 'products/:id' => 'catalog#view' # get 'products/:id' => 'catalog#view'

9
test/controllers/pages_controller_test.rb

@ -1,9 +0,0 @@
require 'test_helper'
class PagesControllerTest < ActionController::TestCase
test "should get letsencrypt" do
get :letsencrypt
assert_response :success
end
end
Loading…
Cancel
Save