Allow to define constrain based on http header
truong-hua opened this issue · 1 comments
truong-hua commented
Expected Behavior
The constrain definitions support reading HTTP header value
Current Behavior
The constrain definitions only support reading values from entity context payload
Possible Solution
A constrain property started with "_" will ready propery value from HTTP header
Steps to Reproduce (for bugs)
Context
For some security issue, some constrains need to be read or generated from the server side such as geolocation. Popular gateway service like nginx can easily inject geo data to header before forwarding it to flagr which is more secure than reading from client request payload.
Your Environment
- Version used (
flagr version
): - Server type and version:
- Operating System and version (
uname -a
): - Link to your project: https://doopage.com