Skip to content

Commit c084f7a

Browse files
committed
Add a note in the README on the breaking change introduced by #57
1 parent 5824a56 commit c084f7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ The server now runs on `localhost:8080`:
4949

5050
{"hello": "world"}
5151

52+
### Allow * With Credentials Security Protection
53+
54+
This library has been modified to avoid a well known security issue when configured with `AllowedOrigins` to `*` and `AllowCredentials` to `true`. Such setup used to make the library reflects the request `Origin` header value, working around a security protection embedded into the standard that makes clients to refuse such configuration. This behavior has been removed with [#55](https://github.com/rs/cors/issues/55) and [#57](https://github.com/rs/cors/issues/57).
55+
56+
If you depend on this behavior and understand the implications, you can restore it using the `AllowOriginFunc` with `func(origin string) {return true}`.
57+
58+
Please refer to [#55](https://github.com/rs/cors/issues/55) for more information about the security implications.
59+
5260
### More Examples
5361

5462
* `net/http`: [examples/nethttp/server.go](https://github.com/rs/cors/blob/master/examples/nethttp/server.go)

0 commit comments

Comments
 (0)