Skip to content

Commit 7304167

Browse files
committed
docs: fix docs around WithCorsMiddleware
1 parent 2f1bf2c commit 7304167

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

documentation/docs/guides/options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ import "github.com/rs/cors"
5858

5959
s := fuego.NewServer(
6060
fuego.WithCorsMiddleware(cors.New(cors.Options{
61-
AllowOrigins: []string{"*"},
62-
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
61+
AllowedOrigins: []string{"*"},
62+
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"},
6363
}).Handler),
6464
)
6565
```

options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func WithTemplateFS(fs fs.FS) func(*Server) {
162162
// AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
163163
// AllowedHeaders: []string{"*"},
164164
// AllowCredentials: true,
165-
// }))
165+
// }).Handler)
166166
// )
167167
func WithCorsMiddleware(corsMiddleware func(http.Handler) http.Handler) func(*Server) {
168168
return func(c *Server) { c.corsMiddleware = corsMiddleware }

0 commit comments

Comments
 (0)