palantir / policy-bot

A GitHub App that enforces approval policies on pull requests
Apache License 2.0
765 stars 102 forks source link

Add support for oauth2 beind proxy #730

Closed KnisterPeter closed 6 months ago

KnisterPeter commented 6 months ago

This change does use the public_url config value to create the oauth2 callback url. This logic is only setup if the config value has been set.

Closes #724

palantirtech commented 6 months ago

Thanks for your interest in palantir/policy-bot, @KnisterPeter! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

KnisterPeter commented 6 months ago

@bluekeyes That's indeed much cleaner 😃

fordneild commented 2 months ago

It seems to me that this prohibits hosting policy-bot at a non root url, such as my-domain.com/policy-bot/ since my path is getting wiped by the default one. Am i missing something?

bluekeyes commented 2 months ago

@fordneild good point, I think that was an oversight here - the public_url value should be allowed to contain subpaths and the OAuth routes should be added to those paths. I filed #804 to track this.

fordneild commented 2 months ago

Thanks for the quick fix!