freman / caddy-reauth

Auth your Caddyserver requests against another server
MIT License
27 stars 15 forks source link

Request placeholder in upstream #23

Open rucciva opened 5 years ago

rucciva commented 5 years ago

Hi, first of all, thanks for making this awesome plugins.

i would like to know if it is possible to include request placeholder in upstream url?

I would like to use it to protect my private docker registry using my private gitea. currently, i am able to permit only user of my gitea to access the private registry. But i would like to add additional access control, that is to make sure the user of the private registry are also the user or a member of an organization in gitea. e.g /v2/someuser/* in registry can only be accessed by user someuser or member of someuser (if someuser is an organization).

so i am thinking of passing the request path to the upstream uri, e.g. upstream url=https://my.gitea.host/v1/api{path},

howardlau1999 commented 5 years ago

+1