@Abhay Chandramouli Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
I understand that you want to add custom response header to your C# Function App response.
Here is the sample code which you can leverage. I was able to add the Content-sys: sys
response header. See below:
Sample Code:
#r "Newtonsoft.Json"
using System.Net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json;
public static async Task<HttpResponseMessage> Run(HttpRequest req, ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string responseMessage = "Hello, World!";
var response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StringContent(responseMessage);
// Add custom header to the response
response.Headers.Add("Content-sys", "sys");
return response;
}
Hope this helps.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.