Issue
I know we can use HttpResponseInstance['headername'] = 'headervalue'
to add header to http response. But in this way, I have to rewrite all the generic view I am using, which makes much more work.
Is there a convenient way to add header to responses, like a callback for responses, or a url decorator?
Solution
You can write a middleware class and implement the method process_response
.
Answered By - Eugene Primako
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.