Skip to content

Commit

Permalink
Add WithExposeHeaders
Browse files Browse the repository at this point in the history
  • Loading branch information
FloRichardAloeCorp committed Apr 19, 2024
1 parent 78744f3 commit 7f19ad3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cors_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func (builder *Builder) WithCredentials(allowCredentials bool) *Builder {
return builder
}

// WithExposeHeaders sets the expose headers for CORS.
func (builder *Builder) WithExposeHeaders(headers ...string) *Builder {
builder.Config.ExposeHeaders = headers
return builder
}

// Build returns the finalized cors.Config after applying the configured options.
func (builder *Builder) Build() *cors.Config {
return builder.Config
Expand Down

0 comments on commit 7f19ad3

Please sign in to comment.