Commit 80c21a9
Changed files (2)
app
controllers
app/controllers/metadata_controller.rb
@@ -1,6 +1,8 @@
class MetadataController < ApplicationController
+ force_ssl if: :ssl_configured?
+
def show
- render xml: to_xml
+ render xml: to_xml, content_type: "application/samlmetadata+xml"
end
private
@@ -10,4 +12,8 @@ class MetadataController < ApplicationController
Idp.default(request).to_xml
end
end
+
+ def ssl_configured?
+ !Rails.env.development?
+ end
end
Gemfile.lock
@@ -2,8 +2,8 @@ PATH
remote: ../saml-kit
specs:
saml-kit (0.1.0)
- activemodel (~> 5.1)
- activesupport (~> 5.1)
+ activemodel (>= 4.2.0)
+ activesupport (>= 4.2.0)
builder (~> 3.2)
nokogiri (~> 1.8)
xmldsig (~> 0.6)
@@ -265,4 +265,4 @@ DEPENDENCIES
webmock
BUNDLED WITH
- 1.15.4
+ 1.16.0