From 0a5d26898cebe6d72b92820f1e944cf55cef6a8a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 22 Mar 2024 18:44:57 -0400 Subject: [PATCH] fix: add cors to pin api --- api/s5/s5.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/s5/s5.go b/api/s5/s5.go index 2a61cec..2b40d15 100644 --- a/api/s5/s5.go +++ b/api/s5/s5.go @@ -229,9 +229,9 @@ func (s *S5API) Routes() (*httprouter.Router, error) { "OPTIONS /s5/download/:cid": middleware.ApplyMiddlewares(corsOptionsHandler, middleware.ProxyMiddleware, defaultCors.Handler), // Pins API - "POST /s5/pin/:cid": middleware.ApplyMiddlewares(s.accountPin, middleware.ProxyMiddleware, authMw), - "GET /s5/pin/:cid/status": middleware.ApplyMiddlewares(s.accountPinStatus, middleware.ProxyMiddleware, authMw), - "DELETE /s5/delete/:cid": middleware.ApplyMiddlewares(s.accountPinDelete, middleware.ProxyMiddleware, authMw), + "POST /s5/pin/:cid": middleware.ApplyMiddlewares(s.accountPin, middleware.ProxyMiddleware, defaultCors.Handler, authMw), + "GET /s5/pin/:cid/status": middleware.ApplyMiddlewares(s.accountPinStatus, middleware.ProxyMiddleware, defaultCors.Handler, authMw), + "DELETE /s5/delete/:cid": middleware.ApplyMiddlewares(s.accountPinDelete, middleware.ProxyMiddleware, defaultCors.Handler, authMw), // Debug API "GET /s5/debug/download_urls/:cid": middleware.ApplyMiddlewares(s.debugDownloadUrls, middleware.ProxyMiddleware, debugCors.Handler),