File tree 1 file changed +11
-3
lines changed
airframe-http/src/main/scala/wvlet/airframe/http/filter
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,17 @@ object Cors {
44
44
/**
45
45
* Create a new RxHttpFilter to add headers to support Cross-origin resource sharing (CORS).
46
46
*
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
+ * }}}
50
58
*
51
59
* @param policy
52
60
*/
You can’t perform that action at this time.
0 commit comments