From 9dcc4816c39df973d8abf0c1db8aac44df8cbbba Mon Sep 17 00:00:00 2001 From: gammazero Date: Tue, 19 Sep 2023 12:31:34 -0700 Subject: [PATCH] New version Update to version v0.1.0 since there are API changes: - Support sepraate encrypted and non-encrypted lookup paths - Removed support for HTTP POST /multihash - Return status 405 "method not allowed" where appropriate --- find.go | 2 ++ version.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/find.go b/find.go index c2a86ac..615f3a5 100644 --- a/find.go +++ b/find.go @@ -40,6 +40,7 @@ func (s *server) findCid(w http.ResponseWriter, r *http.Request, encrypted bool) s.find(w, r, c.Hash(), encrypted) default: w.Header().Set("Allow", http.MethodGet) + w.Header().Add("Allow", http.MethodOptions) http.Error(w, "", http.StatusMethodNotAllowed) } } @@ -57,6 +58,7 @@ func (s *server) findMultihashSubtree(w http.ResponseWriter, r *http.Request, en s.find(w, r, mh, encrypted) default: w.Header().Set("Allow", http.MethodGet) + w.Header().Add("Allow", http.MethodOptions) http.Error(w, "", http.StatusMethodNotAllowed) } } diff --git a/version.json b/version.json index c8da44d..557859c 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.0.7" + "version": "v0.1.0" }