<?php
header("HeaderName: HeaderValue");
?>
app.use(function(req, res, next) {
res.header("HeaderName", "HeaderValue");
next();
});
response.setHeader("HeaderName", "HeaderValue");
class CustomHeaderMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
response["HeaderName"] = "HeaderValue"
return response
"HeaderName" with the name of the header you want to add and "HeaderValue" with the actual value you want to assign to that header. Just include this code in your server-side application to add the desired HTTP header to the responses sent by your server.