[Richie]
>    def process_request(self, request):
>        if 'prefetch' in request.META.get('HTTP_X_MOZ', '').lower():
>            response = HttpResponseForbidden()
>            response['Vary'] = 'x-moz'
>            return response

[Georg]
> Actually that will break all vary-header handling of Django. Better to
> hook into the existing vary-header code. Look at the
> django.views.decorators.vary stuff. It's mostly using the
> patch_vary_headers from django.utils.cache.

I wondered about that, but will the request ever get anywhere near the
views/decorators code?  It will get as far as this middleware and be
rejected.  Or have I misunderstood the architecture?

-- 
Richie Hindle
[EMAIL PROTECTED]


Reply via email to