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

Fix proxy config defect #511

Merged
merged 6 commits into from
Aug 20, 2021
Merged

Fix proxy config defect #511

merged 6 commits into from
Aug 20, 2021

Conversation

StuAA78
Copy link
Collaborator

@StuAA78 StuAA78 commented Aug 19, 2021

https://eaflood.atlassian.net/jira/software/projects/CMEA/boards/907?selectedIssue=CMEA-98

As reported by WRLS, the existing way of specifying the proxy doesn't work correctly. This is due to us replacing the previous http request library with Got but not updating the proxy configuration to reflect breaking changes, and this went undiscovered as we don't use a proxy in any of our environments! We therefore resolve this by reworking how proxy configuration is applied.

In order to test this locally, add the following lines to docker-compose.yml:

  proxy:
    image: hinata/nginx-forward-proxy
    ports:
      - "3128:3128"

And define the proxy in .env as follows:

HTTP_PROXY=http://proxy:3128

@StuAA78 StuAA78 added the bug Something isn't working label Aug 19, 2021
@StuAA78 StuAA78 self-assigned this Aug 19, 2021
As this is a straightforward fix to how we were passing through configuration options, we decided we don't need to add additional unit tests to our existing rules service tests
@StuAA78 StuAA78 requested a review from Cruikshanks August 19, 2021 16:30
@StuAA78 StuAA78 marked this pull request as ready for review August 19, 2021 16:30
So that we don't lose the info on how to set up a local proxy for testing, we add comments to docker-compose.yml and .env.example detailing the process.
@StuAA78 StuAA78 merged commit 3cefa2c into main Aug 20, 2021
@StuAA78 StuAA78 deleted the proxy-port-defect branch August 20, 2021 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants