Permalink
Browse files

Allow HTTPS service gateways

Change-Id: I96b5792a9b9a02a43cceafb8532b2c95429a919c
  • Loading branch information...
1 parent e1c500f commit 2f82eda83f8f1e85f2fea718afa49eda965e10da @kushmerick kushmerick committed Nov 3, 2011
Showing with 2 additions and 3 deletions.
  1. +1 −2 cloud_controller/app/models/service.rb
  2. +1 −1 lib/services/api/messages.rb
@@ -7,8 +7,7 @@ class Service < ActiveRecord::Base
validates_presence_of :label, :url, :token
validates_uniqueness_of :label
- # TODO(mjp): Do we require that all service gateways register with https?
- validates_format_of :url, :with => URI::regexp(['http'])
+ validates_format_of :url, :with => URI::regexp(%w(http https))
validates_format_of :info_url, :with => URI::regexp(%w(http https)), :allow_nil => true
validates_format_of :label, :with => LABEL_REGEX
@@ -18,7 +18,7 @@ class EmptyRequest < JsonMessage
#
class ServiceOfferingRequest < JsonMessage
required :label, SERVICE_LABEL_REGEX
- required :url, URI::regexp(%w(http))
+ required :url, URI::regexp(%w(http https))
optional :description, String
optional :info_url, URI::regexp(%w(http https))

0 comments on commit 2f82eda

Please sign in to comment.