Skip to content

Commit

Permalink
docs: update documentation with additional notes
Browse files Browse the repository at this point in the history
- Fix a typo in the README.md file
- Add a note about the difference between Default() and DefaultConfig() functions
- Add a note about the implications of using all origins in Gin

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Nov 25, 2023
1 parent 8fd6796 commit 56a357d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ func main() {
router.Run()
}
```
note: while Default() allows all origins, DefaultConfig() does not and you will still have to use AllowAllOrigins

Note: while Default() allows all origins, DefaultConfig() does not and you will still have to use AllowAllOrigins.

### Default() allows all origins

Expand All @@ -90,4 +91,5 @@ func main() {
router.Run()
}
```
Using all origins disables the ability for Gin to set cookies for clients. When dealing with credentials, don't allow all origins

Using all origins disables the ability for Gin to set cookies for clients. When dealing with credentials, don't allow all origins.

0 comments on commit 56a357d

Please sign in to comment.