Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test ssl in test_controller

commit 0ee1c9179425559f0bc84d0354fe654c4af96627 1 parent c2d5839
@labria authored
Showing with 8 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +7 −0 app/controllers/test_controller.rb
View
1  .gitignore
@@ -4,6 +4,7 @@ tmp/**/*
public/cache/**/*
doc/api
doc/app
+config/database.yml
db/development.sqlite3
db/schema.rb
config/deploy.rb
View
7 app/controllers/test_controller.rb
@@ -1,2 +1,9 @@
class TestController < ApplicationController
+ def index
+ if request.ssl?
+ render :text => "ssl request"
+ else
+ render :text => "non-ssl request"
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.