-
Notifications
You must be signed in to change notification settings - Fork 205
Prepend application url to app proxy url if it starts with / #6147
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
Conversation
b159331
to
2f54132
Compare
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3121 tests passing in 1324 suites. Report generated by 🧪jest coverage report action from 6efb593 |
b0fc143
to
b4d4f97
Compare
This comment has been minimized.
This comment has been minimized.
b4d4f97
to
8cc6411
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's investigate if this can be done server side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎩 'ed and worked as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Note for future lurkers that this is a compromise in the CLI and it would be ideal to do a better platform solution for relative URLs across app config/extensions in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just left a small comment
8cc6411
to
6efb593
Compare
WHY are these changes introduced?
Closes https://github.com/shop/issues-develop/issues/12741#issue-3249208952
This puts us at parity with webhook subscription URLs, which already have this feature.
WHAT is this pull request doing?
Appends the application url to the start of the proxy URL if the proxy URL starts with / .
Updates validations to allow / leading proxy URLs. Also ensures that only HTTP proxies are used.
How to test your changes?
pnpm shopify app init
[app_proxy]
url = "https://www.api.example.com/api/proxy2"
subpath = "store-pickup"
prefix = "apps"
Substituting focused-share-holder app with your app name:
pnpm shopify app deploy --path=./focused-shareholder-app
should succeedhttps://www.api.example.com/api/proxy2
http://www.api.example.com/api/proxy2
pnpm shopify app deploy --path=./focused-shareholder-app
should fail with an HTTP validation./api/proxy2
pnpm shopify app deploy --path=./focused-shareholder-app
should succeedhttps://example/com/api/proxy2
Measuring impact
How do we know this change was effective? Please choose one:
Checklist