diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-06-06 15:25:02 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-06-08 02:29:17 -0400 |
commit | 469542518c4bb4db00774734c9cb257cd0050076 (patch) | |
tree | ed42f78dbc593102fc9b027962c465153e7d36d0 /svc/http.go | |
parent | 3fe7510b7617780e6bcd7bd9a5575f11f59b6e15 (diff) | |
download | getwtxt-469542518c4bb4db00774734c9cb257cd0050076.tar.gz |
moved type declarations into respective files
Diffstat (limited to 'svc/http.go')
-rw-r--r-- | svc/http.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/svc/http.go b/svc/http.go index ddf8669..347430e 100644 --- a/svc/http.go +++ b/svc/http.go @@ -8,6 +8,16 @@ import ( "strings" ) +// content-type consts +const txtutf8 = "text/plain; charset=utf-8" +const htmlutf8 = "text/html; charset=utf-8" +const cssutf8 = "text/css; charset=utf-8" + +// ipCtxKey is the Context value key for user IP addresses +type ipCtxKey int + +const ctxKey ipCtxKey = iota + // Attaches a request's IP address to the request's context. // If getwtxt is behind a reverse proxy, get the last entry // in the X-Forwarded-For or X-Real-IP HTTP header as the user IP. |