MCPcopy
hub / github.com/zalando/skipper / getResponseHeader

Function getResponseHeader

script/script.go:753–766  ·  view source on GitHub ↗
(f filters.FilterContext)

Source from the content-addressed store, hash-verified

751}
752
753func getResponseHeader(f filters.FilterContext) func(*lua.LState) int {
754 return func(s *lua.LState) int {
755 hdr := s.ToString(-1)
756 res := f.Response().Header.Get(hdr)
757 // TODO(sszuecs): https://github.com/zalando/skipper/issues/1487
758 // if res != "" {
759 // s.Push(lua.LString(res))
760 // return 1
761 // }
762 // return 0
763 s.Push(lua.LString(res))
764 return 1
765 }
766}
767
768func setResponseHeader(f filters.FilterContext) func(*lua.LState) int {
769 return func(s *lua.LState) int {

Callers 1

getResponseValueFunction · 0.85

Calls 2

GetMethod · 0.65
ResponseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…