@@ -111,7 +111,8 @@ func main() {
111
111
functionResult ,
112
112
req .CallbackURL .String (),
113
113
xCallID ,
114
- status )
114
+ status ,
115
+ req .Function )
115
116
116
117
if resultErr != nil {
117
118
log .Printf ("Posted callback to: %s - status %d, error: %s\n " , req .CallbackURL .String (), http .StatusServiceUnavailable , resultErr .Error ())
@@ -160,7 +161,8 @@ func main() {
160
161
functionResult ,
161
162
req .CallbackURL .String (),
162
163
xCallID ,
163
- res .StatusCode )
164
+ res .StatusCode ,
165
+ req .Function )
164
166
165
167
if resultErr != nil {
166
168
log .Printf ("Error posting to callback-url: %s\n " , resultErr )
@@ -252,7 +254,8 @@ func makeClient() http.Client {
252
254
return proxyClient
253
255
}
254
256
255
- func postResult (client * http.Client , functionRes * http.Response , result []byte , callbackURL string , xCallID string , statusCode int ) (int , error ) {
257
+ func postResult (client * http.Client , functionRes * http.Response , result []byte , callbackURL string , xCallID string ,
258
+ statusCode int , functionName string ) (int , error ) {
256
259
var reader io.Reader
257
260
258
261
if result != nil {
@@ -270,6 +273,7 @@ func postResult(client *http.Client, functionRes *http.Response, result []byte,
270
273
}
271
274
272
275
request .Header .Set ("X-Function-Status" , fmt .Sprintf ("%d" , statusCode ))
276
+ request .Header .Set ("X-Function-Name" , functionName )
273
277
274
278
if len (xCallID ) > 0 {
275
279
request .Header .Set ("X-Call-Id" , xCallID )
0 commit comments