Add session_prefix rules and implement matching cookie for classify
This is based on !232 (merged) and !240 (merged)
- Add
src/rules/session_prefix.json
forGITLAB_RULES_CONFIG
[ { "match": { "type": "cookie", "regex_name": "force-cell", "regex_value": "^(?<cell_name>cell-\\d+)" }, "action": "classify", "classify": { "type": "SESSION_PREFIX", "value": "${cell_name}" } }, { "match": { "type": "cookie", "regex_name": "_gitlab_session(_[0-9a-f]+)?", "regex_value": "^(?<cell_name>cell-\\d+)-.*" }, "action": "classify", "classify": { "type": "SESSION_PREFIX", "value": "${cell_name}" } }, { "action": "proxy" } ]
- Now all rules do support
match
, even for proxy action. For now it only supportscookie
match. We can addpath
match at !223 (merged) - Extend
ClassifyRule
for interpolating the matched cookie value into the classify value
TODO:
-
Fill details and fully implement it - Add tests
-
test/index.spec.ts
- [-]
test/rules/classify.spec.ts
- [-]
test/rules/proxy.spec.ts
-
-
Try if it works with GDK
Closes #20 (closed)
Edited by Lin Jen-Shin