1234567891011121314151617181920212223242526272829303132333435363738 |
- package controllers
- import (
- "fmt"
- "hongze/hongze_mobile_admin/utils"
- "net/url"
- )
- type BaseNotAuth struct {
- BaseCommon
- }
- func (c *BaseNotAuth) Prepare() {
- var requestBody string
- method := c.Ctx.Input.Method()
- if method == "GET" {
- requestBody = c.Ctx.Request.RequestURI
- } else {
- requestBody, _ = url.QueryUnescape(string(c.Ctx.Input.RequestBody))
- }
- fmt.Println("requestBody:", requestBody)
- ip := c.Ctx.Input.IP()
- fmt.Println("ip:", ip)
-
- authorization := c.Ctx.Input.Header("Authorization")
- if authorization == "" {
- cookie := c.Ctx.GetCookie("rddp_access_token")
- utils.FileLog.Info("authorization:%s,cookie:%s", authorization, cookie)
- authorization = cookie
- }
- uri := c.Ctx.Input.URI()
- utils.FileLog.Info("URI:%s", uri)
-
-
-
- }
|