From 34bd35e8fca1ded88dad30169b816fcb4322cfa2 Mon Sep 17 00:00:00 2001 From: Gavin McDermott Date: Mon, 14 Jan 2019 11:53:09 -0800 Subject: [PATCH] fix: foreign_api handles pre-flight OPTIONS call on POST requests (#2365) --- wallet/src/controller.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wallet/src/controller.rs b/wallet/src/controller.rs index 1277e7450..99e358370 100644 --- a/wallet/src/controller.rs +++ b/wallet/src/controller.rs @@ -627,6 +627,10 @@ where ok(create_error_response(e)) })) } + + fn options(&self, _req: Request) -> ResponseFuture { + Box::new(ok(create_ok_response("{}"))) + } } // Utility to serialize a struct into JSON and produce a sensible Response