Nginx .htaccess equivalent to protect uploads directories

There may be a smart technique with just Nginx. I haven’t looked.

However, you could perhaps reuse a single child template across projects, given that a child template would make available a variable like site_hosts_canonical | first
(or maybe you’d want to loop over all site_hosts_canonical).

This thread discusses why different variables are available in in the child template context vs the regular nginx include context.

1 Like