Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial committed Sep 12, 2023
1 parent 701a746 commit 81c893f
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@ object Cors {
/**
* Create a new RxHttpFilter to add headers to support Cross-origin resource sharing (CORS).
*
* {{ Cors.newFilter(Cors.Policy( allowsOrigin = origin => { origin match { case x if x.endsWith("mydomain.com") =>
* Some(origin) case _ => None }, allowsMethods = _ => Some(Seq(HttpMethod.POST)), allowsHeaders = headers =>
* Some(headers) )) }}
* {{{
* Cors.newFilter(
* Cors.Policy(
* allowsOrigin = origin => { origin match {
* case x if x.endsWith("mydomain.com") => Some(origin)
* case _ => None
* }},
* allowsMethods = _ => Some(Seq(HttpMethod.POST)),
* allowsHeaders = headers => Some(headers)
* ))
* }}}
*
* @param policy
*/
Expand Down

0 comments on commit 81c893f

Please sign in to comment.