Skip to content

Commit

Permalink
docs: fix docs around WithCorsMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhitt authored and EwenQuim committed Apr 23, 2024
1 parent 6f3a397 commit 11ee6f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/guides/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ import "github.com/rs/cors"

s := fuego.NewServer(
fuego.WithCorsMiddleware(cors.New(cors.Options{
AllowOrigins: []string{"*"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"},
}).Handler),
)
```
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func WithTemplateFS(fs fs.FS) func(*Server) {
// AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
// AllowedHeaders: []string{"*"},
// AllowCredentials: true,
// }))
// }).Handler)
// )
func WithCorsMiddleware(corsMiddleware func(http.Handler) http.Handler) func(*Server) {
return func(c *Server) { c.corsMiddleware = corsMiddleware }
Expand Down

0 comments on commit 11ee6f7

Please sign in to comment.