Skip to content

Commit 81c893f

Browse files
committed
fix format
1 parent 701a746 commit 81c893f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

airframe-http/src/main/scala/wvlet/airframe/http/filter/CorsFilter.scala

+11-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,17 @@ object Cors {
4444
/**
4545
* Create a new RxHttpFilter to add headers to support Cross-origin resource sharing (CORS).
4646
*
47-
* {{ Cors.newFilter(Cors.Policy( allowsOrigin = origin => { origin match { case x if x.endsWith("mydomain.com") =>
48-
* Some(origin) case _ => None }, allowsMethods = _ => Some(Seq(HttpMethod.POST)), allowsHeaders = headers =>
49-
* Some(headers) )) }}
47+
* {{{
48+
* Cors.newFilter(
49+
* Cors.Policy(
50+
* allowsOrigin = origin => { origin match {
51+
* case x if x.endsWith("mydomain.com") => Some(origin)
52+
* case _ => None
53+
* }},
54+
* allowsMethods = _ => Some(Seq(HttpMethod.POST)),
55+
* allowsHeaders = headers => Some(headers)
56+
* ))
57+
* }}}
5058
*
5159
* @param policy
5260
*/

0 commit comments

Comments
 (0)