via

Simple pubsub server inspired by https://patchbay.pub/
git clone https://git.ce9e.org/via.git

commit
ac6969d08c49badbaf11b79ace55143021d1e252
parent
94e1a637be3c72733884019216e4a95cfde54308
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-03-25 05:51
403 on post with password

Diffstat

M via.go 7 ++++++-

1 files changed, 6 insertions, 1 deletions


diff --git a/via.go b/via.go

@@ -85,7 +85,12 @@ func popChannel(key string, ch chan []byte) {
   85    85 }
   86    86 
   87    87 func post(w http.ResponseWriter, r *http.Request) {
   88    -1 	key, _ := splitPassword(r.URL.Path)
   -1    88 	key, password := splitPassword(r.URL.Path)
   -1    89 
   -1    90 	if password != "" {
   -1    91 		http.Error(w, "Forbidden", http.StatusForbidden)
   -1    92 		return
   -1    93 	}
   89    94 
   90    95 	body, err := ioutil.ReadAll(r.Body)
   91    96 	if err != nil {