Skip to content

Commit

Permalink
Fix a few issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlarkworthy committed Jun 4, 2020
1 parent 07a4b3a commit fd11384
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions google_cloud/minecraft/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ locals {
# through the Cloud Console mobile app or https://console.cloud.google.com
# Create a group at https://groups.google.com/forum/#!creategroup
# and invite members by their email address.
enable_switch_access_group = 0 # Replace with 1 to enable google group admins
minecraft_switch_access_group = "GROUP_EM@IL_ADDRESS@googlegroups.com"
enable_switch_access_group = 1 # Replace with 1 to enable google group admins
minecraft_switch_access_group = "minecraft-switchers-lark@googlegroups.com"
}


Expand Down
10 changes: 7 additions & 3 deletions google_cloud/openresty-beyondcorp/files/default.template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ server {
local envelope = {
messages = {
[1] = {
data = b64.encode_base64url(body),
data = ngx.encode_base64(body),
attributes = {
-- headers = cjson.encode(headers),
method = ngx.req.get_method(),
Expand Down Expand Up @@ -416,14 +416,18 @@ server {
local incoming = cjson.decode(ngx.req.get_body_data())
local upstream_url = "${UPSTREAM_URL}" .. incoming.message.attributes.uri
local upstream_method = incoming.message.attributes.method
local upstream_body = b64.decode_base64url(incoming.message.data)
local upstream_body = ngx.decode_base64(incoming.message.data)


local upstreamtoken = ngx.location.capture('/token').body

ngx.log(ngx.WARN, "upstream_url: " .. upstream_url)
ngx.log(ngx.WARN, "upstream_method: " .. upstream_method)
-- ngx.log(ngx.WARN, "upstream_body: " .. upstream_body)
if upstream_body ~= nil then
ngx.log(ngx.WARN, "upstream_body: " .. upstream_body)
elseif incoming.message.data ~= nil then
ngx.log(ngx.WARN, "Could not decode incoming.message.data: " .. incoming.message.data)
end
ngx.log(ngx.WARN, "upstream_token : " .. upstreamtoken)


Expand Down

0 comments on commit fd11384

Please sign in to comment.