summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-24 20:03:19 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-24 20:03:19 +0200
commit393b59ef5d1d05fd00e102231e689f646c438582 (patch)
tree09f3601fcf6fb13bef25f21df869b06d29cf989c
parent8109b957b668a90d4a9b00f1e9db3d8d7e491bf3 (diff)
proc: expose HTTP Origin header in process environment
Map the "Origin:" header as $HTTP_ORIGIN environment variable for use by request handling processes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/proc.c b/proc.c
index e360897..88ec31e 100644
--- a/proc.c
+++ b/proc.c
@@ -30,6 +30,7 @@
__header(connection, connection) \
__header(cookie, cookie) \
__header(host, host) \
+ __header(origin, origin) \
__header(referer, referer) \
__header(user_agent, user-agent) \
__header(content_type, content-type) \
@@ -63,6 +64,7 @@ static const struct {
{ "HTTP_CONNECTION", HDR_connection },
{ "HTTP_COOKIE", HDR_cookie },
{ "HTTP_HOST", HDR_host },
+ { "HTTP_ORIGIN", HDR_origin },
{ "HTTP_REFERER", HDR_referer },
{ "HTTP_USER_AGENT", HDR_user_agent },
{ "HTTP_X_HTTP_METHOD_OVERRIDE", HDR_x_http_method_override },