Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add client request ip #2156

Closed
wants to merge 2 commits into from
Closed

add client request ip #2156

wants to merge 2 commits into from

Conversation

qAison
Copy link
Contributor

@qAison qAison commented Sep 11, 2016

1、access log add client request ip.
2、orm log delete repetition time.
3、const config dir and file.

2、orm log delete repetition time.
3、const config dir and file.

// 获取 客户端 IP
func GetRequestIP(r *http.Request) string {
if ips := r.Header.Get("X-Forwarded-For"); ips != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@astaxie
Copy link
Member

astaxie commented Sep 13, 2016

@qAison leave the comments please update it

"strings"
)

// 获取 客户端 IP

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments should be English I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is we don't need this. As it's already implement in context.Input

@astaxie
Copy link
Member

astaxie commented Sep 15, 2016

@qAison I have updated the code in develop. As you didn't update this PR as I suggested. I made these change.

1、access log add client request ip.
2、orm log delete repetition time.

I will close this PR

@astaxie astaxie closed this Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants