mirror of
https://github.com/safing/portbase
synced 2025-09-16 01:59:51 +00:00
Add response headers to APIRequest
This commit is contained in:
parent
f2208faf8c
commit
82ed043721
2 changed files with 6 additions and 0 deletions
|
@ -436,6 +436,9 @@ func (e *Endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
// Add response headers to request struct so that the endpoint can work with them.
|
||||
apiRequest.ResponseHeader = w.Header()
|
||||
|
||||
// Execute action function and get response data
|
||||
var responseData []byte
|
||||
var err error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue