-
Notifications
You must be signed in to change notification settings - Fork 2
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
Setup proxy to host instead of rewriting URL #386
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Meticulous spotted zero visual differences across 8 screens tested: view results. Test suite: test Meticulous with deployment url. Last updated for commit 5c615d1. This comment will update as new commits are pushed. |
✅ Meticulous spotted zero visual differences across 8 screens tested: view results. Test suite: test Meticulous with app url. Last updated for commit 5c615d1. This comment will update as new commits are pushed. |
82e430d
to
e761e04
Compare
e761e04
to
7652540
Compare
7652540
to
d8e2760
Compare
d8e2760
to
83a697b
Compare
83a697b
to
4bd40c9
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.
Nice!
4bd40c9
to
5c615d1
Compare
After #386, this connection check no longer makes sense as we can always open a port to the proxy so it isn't really checking anything. Instead, let's try and actually fetch the appUrl and see if the server behind the proxy gives us _something_ back. We don't check the status code other than 502 which is what the proxy will return if it can't connect to the server since this most closely mimics the behaviour of just opening a socket that we had before. This PR also adds in some waiting, so that we'll retry a couple of times to allow for the fact that the server to test against may take a bit of time to spin up. This should avoid the need for customers to add/tweak manual `sleep`s in their workflow. Also, one small fix to an error message.
This should unblock customers using Auth0 which will stop the page load if it sees a non-HTTPS and non-localhost URL.
Sample run on my personal website: https://github.com/edoardopirovano/website/actions/runs/7797651026/job/21267781609
Screenshots in the test run all look good: https://app.meticulous.ai/projects/edoardopirovano/website/test-runs/tnmzLBTmNqDJqQm8LKRpMzQbFd
Viewing a simulation confirms we were hitting
localhost
and using the proxy: https://app.meticulous.ai/projects/edoardopirovano/website/simulations/ggGWCJ6kNPnbmKbtGKqpqLDTq7Resolves ENG-862