Skip to content

Commit

Permalink
Merge pull request #755 from graywolf336/ssl-admin-option-754
Browse files Browse the repository at this point in the history
Allowing the rejecting/allowing of ssl certs to be configurable by the admin
  • Loading branch information
engelgabriel committed Sep 11, 2015
2 parents 895bd84 + 368c0c3 commit 4a546a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"Add_users" : "Add users",
"Administration" : "Administration",
"All_channels" : "All channels",
"Allow_Invalid_SelfSigned_Certs": "Allow invalid and Self-Signed SSL certificate's for link validation and previews",
"and" : "and",
"API_Analytics" : "Analytics",
"API_Embed" : "Embed",
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-lib/settings/server/startup.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Meteor.startup ->

RocketChat.settings.addGroup 'General'
RocketChat.settings.add 'Site_Name', 'Rocket.Chat', { type: 'string', group: 'General', public: true }
RocketChat.settings.add 'Allow_Invalid_SelfSigned_Certs', false, { type: 'boolean', group: 'General' }

RocketChat.settings.addGroup 'API'
RocketChat.settings.add 'API_Analytics', '', { type: 'string', group: 'API', public: true }
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-oembed/server/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ getUrlContent = (urlObj, redirectCount = 5, callback) ->
port: urlObj.port
hostname: urlObj.hostname
path: urlObj.path
rejectUnauthorized: false
rejectUnauthorized: !RocketChat.settings.get 'Allow_Invalid_SelfSigned_Certs'

httpOrHttps = if urlObj.protocol is 'https:' then https else http

Expand Down

0 comments on commit 4a546a1

Please sign in to comment.