Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nginx to known proxies #3002

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

MGibson1
Copy link
Member

@MGibson1 MGibson1 commented Jun 6, 2023

Type of change

- [ ] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

#2847 enabled proxy chains, but in so doing removed our workaround for removing the nginx proxy present in self hosted deployments. It turns out that our middlware was not set up to automatically trust the nginx container run in tandem with our services in a standard self-host deployment. While knownProxies global settings probably would work to solve this issue, it isn’t a feasible fix because the ips change constantly.

This adds the nginx container’s IP to known proxies for standard self-host deployments. Unified does not need it due to localhost being trusted by default.

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@MGibson1 MGibson1 added ee and removed ee labels Jun 6, 2023
@MGibson1 MGibson1 requested a review from justindbaur June 7, 2023 19:23
@MGibson1 MGibson1 force-pushed the platform/pm-2138/add-nginx-to-known-proxies branch from c151dca to 5ed2a1b Compare June 7, 2023 19:24
@MGibson1 MGibson1 force-pushed the platform/pm-2138/add-nginx-to-known-proxies branch from 5ed2a1b to 7be4009 Compare June 7, 2023 19:25
@MGibson1 MGibson1 marked this pull request as ready for review June 7, 2023 20:16
Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple style things.

src/Core/Settings/IGlobalSettings.cs Outdated Show resolved Hide resolved
src/SharedWeb/Utilities/ServiceCollectionExtensions.cs Outdated Show resolved Hide resolved
@MGibson1 MGibson1 requested a review from justindbaur June 8, 2023 12:51
Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@MGibson1 MGibson1 merged commit e27ab5d into master Jun 8, 2023
@MGibson1 MGibson1 deleted the platform/pm-2138/add-nginx-to-known-proxies branch June 8, 2023 13:41
MGibson1 added a commit that referenced this pull request Jun 21, 2023
* Add nginx to known proxies

* Only add nginx proxy if standard self host deployment

* Style changes

(cherry picked from commit e27ab5d)
@djsmith85 djsmith85 linked an issue Jun 23, 2023 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong IP behind reverse proxy
2 participants