Skip to content

Instantly share code, notes, and snippets.

View gerardcl's full-sized avatar
🏠
Working from home

gerardcl gerardcl

🏠
Working from home
View GitHub Profile
@gerardcl
gerardcl / minio-openshift.yaml
Created June 4, 2020 13:23
MinIO OpenShift Template
apiVersion: v1
kind: Template
metadata:
name: minio
parameters:
- name: MEMORY_LIMIT
displayName: Memory Limit
description: Maximum amount of memory available for the container.
value: 256Mi
required: true
@gerardcl
gerardcl / auth-crowd.lua
Last active February 23, 2019 18:30
Lua Crowd HTTP Auth module
local _M = {}
function _M.run ()
-- grab auth header
local auth_header = ngx.req.get_headers().authorization
local hWWWAuth = string.format('Basic realm="%s"', os.getenv("CROWD_REALM_NAME"))
-- check that the header is present, and if not sead authenticate header
if not auth_header or auth_header == '' or not string.match(auth_header, '^[Bb]asic ') then
ngx.log(ngx.DEBUG, string.format("no auth header provided --> basic realm set to: %s", hWWWAuth))