Skip to content

make selenium link more robust#20

Open
janwillies wants to merge 1 commit intoAccenture:masterfrom
janwillies:selenium
Open

make selenium link more robust#20
janwillies wants to merge 1 commit intoAccenture:masterfrom
janwillies:selenium

Conversation

@janwillies
Copy link
Member

@janwillies janwillies commented Aug 28, 2016

I have adop running at http://192.168.99.100:30080/ and the link now correctly rewrites to http://selenium.192.168.99.100.xip.io:30080///grid/console. But still the page doesn't display until I manually change something in the URL, and then use the back button. I'm using Google Chrome, maybe someone can try with a different browser (safari didn't work)?

@anton-kasperovich
Copy link
Contributor

Could you please provide a bit more details, i didn't get where the actual issue is. Which url works and which isn't, as:

"http://"+ host + "." + window.location.host

"http://selenium.127.0.0.1.xip.io:8080"
"http://"+ host + "." + window.location.hostname

"http://selenium.127.0.0.1.xip.io"

Your version in Google chrome returned me url without port:

"http://"+ host + "." + window.location.hostname+ (window.location.host.indexOf(".xip.io") > -1 ? "" : ".xip.io" + (window.location.port ? ':' + window.location.port + '/' : '/'))

"http://selenium.127.0.0.1.xip.io"

http://bl.ocks.org/abernier/3070589 - Link anatomy

@janwillies
Copy link
Member Author

janwillies commented Sep 5, 2016

the port is only returned when it is provided (which means an implicit port 80 or 443 won't trigger)

without this patch, running on any port other than :80 or :443 won't work, because the URL always rewrites to window.location.host + ".xip.io/". For example, running on 192.168.99.100:30080 results in an invalid URL: 192.168.99.100:30080.xip.io/, but what we really want is 192.168.99.100.xip.io:30080/

Or am I missing something here?

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.

2 participants