Skip to content

Instantly share code, notes, and snippets.

View m1n9o's full-sized avatar
🚗

DU5T6REAK m1n9o

🚗
View GitHub Profile
server {
listen 0.0.0.0:3001;
location / {
rewrite_by_lua_block {
local cookie_value = ngx.req.get_headers()["Cookie"]
if cookie_value ~= nil then
local jwt = cookie_value:match("access_token=([^ ]+)")
ngx.req.set_header("Authorization", "Bearer " .. jwt)
end