summaryrefslogtreecommitdiff
path: root/vendor/github.com/gin-contrib/cors/cors.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-11-27 13:15:03 +0000
committerLibravatar GitHub <noreply@github.com>2023-11-27 13:15:03 +0000
commit66b77acb1c8b86f0be3836ccaf31683c0bfa317a (patch)
tree9a255a8ea8ef97229b6d75d17de45bdac1755be9 /vendor/github.com/gin-contrib/cors/cors.go
parent[bugfix] Add Actor to outgoing poll vote Create; other fixes (#2384) (diff)
downloadgotosocial-66b77acb1c8b86f0be3836ccaf31683c0bfa317a.tar.xz
[chore]: Bump github.com/gin-contrib/cors from 1.4.0 to 1.5.0 (#2388)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/gin-contrib/cors/cors.go')
-rw-r--r--vendor/github.com/gin-contrib/cors/cors.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/gin-contrib/cors/cors.go b/vendor/github.com/gin-contrib/cors/cors.go
index f0e230ae4..b32522277 100644
--- a/vendor/github.com/gin-contrib/cors/cors.go
+++ b/vendor/github.com/gin-contrib/cors/cors.go
@@ -17,8 +17,8 @@ type Config struct {
// Default value is []
AllowOrigins []string
- // AllowOriginFunc is a custom function to validate the origin. It take the origin
- // as argument and returns true if allowed or false otherwise. If this option is
+ // AllowOriginFunc is a custom function to validate the origin. It takes the origin
+ // as an argument and returns true if allowed or false otherwise. If this option is
// set, the content of AllowOrigins is ignored.
AllowOriginFunc func(origin string) bool
@@ -26,6 +26,9 @@ type Config struct {
// cross-domain requests. Default value is simple methods (GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS)
AllowMethods []string
+ // AllowPrivateNetwork indicates whether the response should include allow private network header
+ AllowPrivateNetwork bool
+
// AllowHeaders is list of non simple headers the client is allowed to use with
// cross-domain requests.
AllowHeaders []string
@@ -53,6 +56,9 @@ type Config struct {
// Allows usage of file:// schema (dangerous!) use it only when you 100% sure it's needed
AllowFiles bool
+
+ // Allows to pass custom OPTIONS response status code for old browsers / clients
+ OptionsResponseStatusCode int
}
// AddAllowMethods is allowed to add custom methods