Skip to content

Commit

Permalink
engine: Add content-type in the response of allowed (#90)
Browse files Browse the repository at this point in the history
Signed-off-by: minchao <[email protected]>
  • Loading branch information
minchao authored and aeneasr committed Mar 6, 2019
1 parent 1cb8a36 commit 39a1486
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package engine

import (
"context"
"encoding/json"
"net/http"

"github.com/julienschmidt/httprouter"
Expand Down Expand Up @@ -48,10 +47,7 @@ func (h *Engine) Evaluate(e evaluator) httprouter.Handle {
return
}

if err := json.NewEncoder(w).Encode(&AuthorizationResult{Allowed: allowed}); err != nil {
h.h.WriteError(w, r, errors.WithStack(err))
return
}
h.h.Write(w, r, &AuthorizationResult{Allowed: allowed})
}
}

Expand Down

0 comments on commit 39a1486

Please sign in to comment.