OSDN Git Service

Email link https support
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Sat, 31 Mar 2012 12:59:06 +0000 (15:59 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Sat, 31 Mar 2012 12:59:06 +0000 (15:59 +0300)
app/mailers/notify.rb
config/gitlab.yml.example

index 50ccb99..9c2cc7c 100644 (file)
@@ -1,5 +1,7 @@
 class Notify < ActionMailer::Base
   default_url_options[:host] = EMAIL_OPTS["host"]
+  default_url_options[:protocol] = -> { EMAIL_OPTS["protocol"] ? EMAIL_OPTS["protocol"] : "http" }.call
+
   default from: EMAIL_OPTS["from"]
 
   def new_user_email(user, password)
index 5d40b2b..05d0085 100644 (file)
@@ -6,6 +6,10 @@ email:
   from: notify@gitlabhq.com
   host: gitlabhq.com
 
+  # Protocol used for links in email letters
+  # Value can be http or https
+  protocol: http # or https
+
 # Git Hosting congiguration
 git_host:
   system: gitolite