shreemaan-abhishek opened a new pull request, #13635:
URL: https://github.com/apache/apisix/pull/13635

   ### Description
   
   The `get_cookie` helper in cas-auth was added to fall back to parsing the 
raw `Cookie` header when `$cookie_<name>` returned nil, on the theory that 
nginx's `$cookie_<name>` variable doesn't reliably expose cookies with long 
names (the per-config session cookie is `CAS_SESSION_<sha256-hex>`, 76 chars).
   
   That fallback isn't needed: nginx exposes cookies via `$cookie_<name>` 
regardless of name length on supported OpenResty builds. This drops the helper 
and reads the session cookie directly via `ctx.var["cookie_" .. 
opts.cookie_name]`, consistent with how the `CAS_REQUEST_URI` cookie is already 
read in the same plugin.
   
   No behavior change on supported runtimes; pure cleanup of dead code.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change (existing cas-auth 
tests cover cookie reads; no new behavior)
   - [x] I have updated the documentation to reflect this change (internal 
helper, no doc impact)
   - [x] I have verified that this change passes lint


-- 
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]

Reply via email to