Traefik equivalant of Nginx's X-Accel-Redirect?

Hi all - I'm trying to switch a project of mine to Traefik, but there's part that I haven't found in the docs.

I have certain files that need to be served but only conditionally, based on a permissions scheme in my Django app. E.g. serve certain files only to specific logged in users, serve other files to anonymous users.

With Nginx, this is the solution that I'd follow: https://wellfire.co/learn/nginx-django-x-accel-redirects/

How would I implement a similar solution in Traefik and docker+docker-compose?

Many thanks!