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

Feature/proxy support #405

Merged
merged 8 commits into from
Jan 21, 2022
Merged

Conversation

mscharp
Copy link
Contributor

@mscharp mscharp commented Dec 9, 2020

This will enable proxy support for those who are behind a corporate proxy.

Fixes #388

Description of Issue Fixed
When behind a proxy, all calls to AWS services fail since they do not go through the proxy.

Changes proposed in this pull request:

When setting up the AWS services, pass in the httpOptions object that serverless creates.

This will enable proxy support for those who are behind a corporate proxy.
@@ -1414,7 +1417,7 @@ describe("Custom Domain Plugin", () => {
});

it("Domain summary failed", async () => {
AWS.mock("APIGateway", "getDomainName", (params, callback) => {
AWS.mock("ApiGatewayV2", "getDomainName", (params, callback) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why this was set to APIGateway to begin with. The actual code uses the ApiGatewayV2 to make the call to getDomainName. Tests worked fine before my changes ( I don't know why ), but after they would hang on this test until I updated the mock to ApiGatewayV2 to match the actual code.

I thought the getCredentials() call was only returning the credentials, but it seems to be returning the entire config object.  Regardless, this now works.
@mscharp
Copy link
Contributor Author

mscharp commented Dec 9, 2020

Hey @rddimon. Not sure if you're the main owner of the plugin, but hoping I can get someone to look over the PR and merge if it looks good. Getting proxy support would be really handy!

@rddimon rddimon merged commit 0f2fabb into amplify-education:master Jan 21, 2022
@rddimon rddimon mentioned this pull request Jan 21, 2022
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.

Unable to setup base domain behind HTTP proxy
2 participants