Skip to content

Commit

Permalink
fix(cassandra) allow self-signed certificates for migrations
Browse files Browse the repository at this point in the history
Follow-up of 5e2d31e9f5d79c901ef5364eb8786c86c0ae5010 for the Cassandra
DAO strategy.
  • Loading branch information
thibaultcha committed Sep 25, 2017
1 parent fe95319 commit 68d358b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kong/dao/db/cassandra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ function _M.new(kong_config)
if ngx.IS_CLI then
local policy = require("resty.cassandra.policies.reconnection.const")
cluster_options.reconn_policy = policy.new(100)

-- Force LuaSocket usage in order to allow for self-signed certificates
-- to be trusted (via opts.cafile) in the resty-cli interpreter.
-- As usual, LuaSocket is also forced in non-supported cosocket contexts.
local socket = require "cassandra.socket"
socket.force_luasocket("timer", true)
end

--
Expand Down

0 comments on commit 68d358b

Please sign in to comment.