【问题标题】:Getting input headers in openresty在 openresty 中获取输入标头
【发布时间】:2021-06-05 18:23:17
【问题描述】:

我使用 openresty 作为带有 spnego-http-auth-nginx-module 的 nginx 服务器
此模块将请求标头 Authorization: Negotiate YIIG... 替换为 Authorization: Basic ... 并设置 REMOTE_USER 标头。
如何将原始授权标头值复制到另一个自定义标头键以保存原始授权标头值?

【问题讨论】:

    标签: nginx lua openresty


    【解决方案1】:

    这个配置 sn -p 返回需要的数据:

       ...
            set_by_lua_block $xauth {
                local inp = ngx.req.raw_header(true)
                return string.match(inp, "Negotiate .*==")
            }
            uwsgi_param XAUTH $xauth;
        ...
    

    【讨论】:

      猜你喜欢
      • 2021-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-30
      • 2021-11-08
      • 2011-08-27
      相关资源
      最近更新 更多