title: Encode and decode pathname in nginx
body: <p>Normally files can be accessed at:</p>
  
  <p><a href="http://example.com/cats/cat1.zip" rel="noreferrer">http://example.com/cats/cat1.zip</a></p>
  
  <p>I want to encode/encrypt the pathname (/cats/cat1.zip) so that the link is not normally accessible but accessible after the pathname is encrypted/encoded:</p>
  
  <p><a href="http://example.com/Y2F0cy9jYXQxLnppcAo=" rel="noreferrer">http://example.com/Y2F0cy9jYXQxLnppcAo=</a></p>
  
  <p>I'm using base64 encoding above for simplicity but would prefer encryption. How do I do about doing this? Do I have to write a custom module?</p>