Skip to content

Commit

Permalink
Remove ip check
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Dec 26, 2024
1 parent cf2068f commit eb59b72
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion crproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,6 @@ func (c *CRProxy) notFoundResponse(rw http.ResponseWriter, r *http.Request) {
func (c *CRProxy) redirect(rw http.ResponseWriter, r *http.Request, blobPath string, info *PathInfo) error {
options := map[string]interface{}{
"method": r.Method,
"ip": r.RemoteAddr,
}
linkExpires := c.linkExpires
if linkExpires > 0 {
Expand Down
8 changes: 0 additions & 8 deletions storage/driver/oss/oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,6 @@ func (d *driver) URLFor(ctx context.Context, path string, options map[string]int
}
}

ip, ok := options["ip"]
if ok {
ipString, ok := ip.(string)
if ok {
q["x-oss-ac-source-ip"] = []string{ipString}
q["x-oss-ac-subnet-mask"] = []string{"32"}
}
}
signedURL := d.Bucket.SignedURLWithMethod(methodString, d.ossPath(path), expiresTime, q, nil)
return signedURL, nil
}
Expand Down

0 comments on commit eb59b72

Please sign in to comment.