shreemaan-abhishek commented on issue #10936: URL: https://github.com/apache/apisix/issues/10936#issuecomment-1947791728
you can access cookies like so: `ngx.var.cookie_NAME` https://github.com/openresty/lua-nginx-module/issues/19#issuecomment-825373 To set a cookie value to a header you can use the serverless plugin to set headers like so: ```shell curl "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT \ -H "X-API-KEY: ${ADMIN_API_KEY}" \ -d '{ "plugins": { "serverless-post-function": { "functions": [ "return function (conf, ctx) local core = require(\"apisix.core\"); core.request.set_header(ctx, \"abc\", \"def\"); end" ] } }, "upstream": { "nodes": { "httpbin.org:80": 1 }, "type": "roundrobin" }, "uri": "/*" }' ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
