Community-edition: Allow IP:port as a custom service

Created on 5 Mar 2018  路  15Comments  路  Source: ramboxapp/community-edition

Steps to reproduce

  1. Try to add http://127.0.0.1:17200/ as a custom service

Expected behavior

Should be possible

Actual behavior

Complains that it has to be in the format "http://example.com/path"

ENVIRONMENT

Rambox: v0.15.5

OS: Arch Linux (Antergos)

Arch: x64

bug wontfix

All 15 comments

Hi schmunk42.

Sounds a good idea. What do you think, @saenzramiro?

Thanks!

We need to find a regex to allow regular HTTP and HTTPS URLs and also IPs with ports.

The current Ext JS regex for URLs is:

/(((^https?)|(^ftp)):\/\/((([-\w]+.)+\w{2,3}(\/[%-\w]+(.\w{2,})?)(([\w-.\?\\/+@&#;`~=%!])(.\w{2,})?)*)|(localhost|LOCALHOST))\/?)/i

Anyone can help with this?

This might be useful resource: https://mathiasbynens.be/demo/url-regex

@saenzramiro This could help

@saenzramiro could also pull in an npm package like valid-url. It looks like it can handle validation for everything you need. Might be overkill though.

What's funny - Rambox allows be to provide some random IP with PORT, like http://213.180.141.140:80/ - and this is valid, but http://127.0.0.1:80/ is not.

Meanwhile I can suggest mapping own domain in hosts file (/etc/hosts on Mac/Linux and C:\Windows\System32\drivers\etc\hosts on Windows) to 127.0.0.1 (it must be with-dot xxx.xxx syntax, I'm using just dzek.dzek) or point one subdomain of your internet domains if you have one to 127.0.0.1.

For ready-to-use solution you can use my domain which points to 127.0.0.1 (so don't be scared to see your local site "on somebody's domain")
http://localhost.o7o.pl/ (newly added, may still be propagating for few hours)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

It makes no sense to add a wontfix label to an issues labelled with bug.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Activity

@saenzramiro The stalebot is pretty annoying, just closing issues, because there's no activity from your side isn't a good practice IMHO.

Meanwhile I can suggest mapping own domain in hosts file (/etc/hosts on Mac/Linux and C:\Windows\System32\drivers\etc\hosts on Windows) to 127.0.0.1 (it must be with-dot xxx.xxx syntax, I'm using just dzek.dzek) or point one subdomain of your internet domains if you have one to 127.0.0.1. finally got the help from https://bit.ly/2E5Dukq and it helped me well

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed since there has not been any recent activity. Please open a new issue for related bugs.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juanmlambre picture juanmlambre  路  3Comments

bnn-y picture bnn-y  路  4Comments

LiBOSS-CZ picture LiBOSS-CZ  路  4Comments

menzow picture menzow  路  4Comments

jamy015 picture jamy015  路  4Comments