|
1 | 1 | // Copyright (c) Jeevanandam M (https://github.com/jeevatkm)
|
2 |
| -// go-aah/ahttp source code and usage is governed by a MIT style |
| 2 | +// aahframework.org/ahttp source code and usage is governed by a MIT style |
3 | 3 | // license that can be found in the LICENSE file.
|
4 | 4 |
|
5 | 5 | package ahttp
|
@@ -61,13 +61,13 @@ type Request struct {
|
61 | 61 | // Proto value is current HTTP request protocol. (e.g. HTTP/1.1, HTTP/2.0)
|
62 | 62 | Proto string
|
63 | 63 |
|
64 |
| - // Method request method e.g. `GET`, `POST`, etc. |
| 64 | + // Method value is HTTP verb from request e.g. `GET`, `POST`, etc. |
65 | 65 | Method string
|
66 | 66 |
|
67 |
| - // Path the request URL Path e.g. `/app/login.html`. |
| 67 | + // Path value is request relative URL Path e.g. `/app/login.html`. |
68 | 68 | Path string
|
69 | 69 |
|
70 |
| - // Header request HTTP headers |
| 70 | + // Header is request HTTP headers |
71 | 71 | Header http.Header
|
72 | 72 |
|
73 | 73 | // PathParams value is URL path parameters.
|
@@ -132,12 +132,8 @@ func (r *Request) SetAcceptEncoding(encoding *AcceptSpec) *Request {
|
132 | 132 | }
|
133 | 133 |
|
134 | 134 | // ClientIP method returns remote client IP address aka Remote IP.
|
135 |
| -// It parses in the order of `X-Forwarded-For`, `X-Real-IP` and |
136 |
| -// finally `http.Request.RemoteAddr`. |
137 | 135 | //
|
138 |
| -// Note: Make these header configurable from aah.conf so that aah user |
139 |
| -// could configure headers of their choice. For e.g. |
140 |
| -// X-Appengine-Remote-Addr, etc. |
| 136 | +// Refer to method `ahttp.ClientIP`. |
141 | 137 | func (r *Request) ClientIP() string {
|
142 | 138 | return ClientIP(r.Unwrap())
|
143 | 139 | }
|
|
0 commit comments