Use a context processor instead of a middleware