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

feat: port custom domain support. #379

Merged
merged 2 commits into from
Dec 13, 2021
Merged

feat: port custom domain support. #379

merged 2 commits into from
Dec 13, 2021

Conversation

sktimalsina
Copy link
Member

Issue #, if available:

Description of changes:
Add the support to custom domain described in aws configuration. Existing functionality of appsync generated domains (with 26 char host) is not changed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

CUSTOM;

private static final String STANDARD_ENDPOINT_REGEX =
"^https://\\w{26}\\.appsync-api\\.\\w{2}(?:(?:-\\w{2,})+)-\\d\\.amazonaws.com/graphql$";
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't / be escaped?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also why \ in \w needs to be escaped?

Copy link
Member Author

@sktimalsina sktimalsina Dec 10, 2021

Choose a reason for hiding this comment

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

Shouldn't / be escaped?

No, as this is being used for pattern matcher. Here, we are literally looking to match // and hence escaping it would be redundant.

Also why \ in \w needs to be escaped?

This portion is regex expression and hence we need double backslashes to protect them from being interpreted as escape sequence from the compiler. (\\w will be transformed to \w which is valid regex construct)

@sktimalsina sktimalsina merged commit 4276bd1 into main Dec 13, 2021
@sktimalsina sktimalsina deleted the custom_domain branch December 13, 2021 19:48
levansang026 pushed a commit to notabasement/aws-mobile-appsync-sdk-android that referenced this pull request Nov 19, 2022
* feat: port custom domain support.

* remove extra space
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.

4 participants