about summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d39aa5e..398c3b2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,6 +5,7 @@ mod frontend;
 mod indieauth;
 mod micropub;
 
+use crate::micropub::CORSMiddleware;
 use crate::indieauth::IndieAuthMiddleware;
 
 #[derive(Clone)]
@@ -29,6 +30,7 @@ where
     Storage: database::Storage + Send + Sync + Clone,
 {
     app.at("/micropub")
+        .with(CORSMiddleware {})
         .with(IndieAuthMiddleware::new())
         .get(micropub::get_handler)
         .post(micropub::post_handler);