-
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
feat(wai-handler-launch): Add function to launch arbitrary URLs #2
Conversation
This commit adds the function runHostPortFullUrl to allow launching arbitrary URLs instead of the hardcoded base http://127.0.0.1. It allows using ::1 as the host IP address, while launching http://[::1]/, where the additional brackets are required to access IPv6 IPs from the browser. As the generation of the URL is moved into runHostPortUrl, both the C launch function and the Haskell launch function can be reduced to (C)String -> IO () without breaking backwards compability.
Looks like the CI fails are all caused by broken dependencies (QtWebKit) or deprecated functions. I am assuming that they are unrelated to my changes. |
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.
Minor comment on version numbers. I'll take a crack at getting the CI to pass on master
as well.
d11a704
to
f9c1245
Compare
Is it preferred to squash the commits together? |
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.
Thanks!
Unfortunately, this fails to build on Windows, just revealed by hledger's CI: |
Ah, I think it should be
|
Good catch, thanks! I'm uploading the fix shortly. |
This commit adds the function
runHostPortFullUrl
to allow launchingarbitrary URLs instead of the hardcoded base
http://127.0.0.1
.It allows using
::1
as the host IP address, while launchinghttp://[::1]/
,where the additional brackets are required to access IPv6 IPs from the browser.
As the generation of the default URL is moved into
runHostPortUrl
, both the C launchfunction and the Haskell launch function can be reduced to (C)String -> IO ()
without breaking backwards compability.
This closes #1
Before submitting your PR, check that you've:
@since
declarations to the HaddockAfter submitting your PR:
Todo