Skip to content
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

Multi-level subdomains not supported. #12

Open
nautmichio opened this issue Feb 28, 2022 · 2 comments
Open

Multi-level subdomains not supported. #12

nautmichio opened this issue Feb 28, 2022 · 2 comments

Comments

@nautmichio
Copy link

I use a multilevel subdomain for all my local services. If I use more than 3 qualifiers for the url yape will not accept as a valid hostname.

image

@joshuajcoronado
Copy link

joshuajcoronado commented Mar 25, 2022

Updating the regex in options.js

-    const isValidName = /^(?!:\/\/)([a-zA-Z0-9]+\.)?[a-zA-Z0-9][a-zA-Z0-9-]+\.[a-zA-Z]{2,6}?$/i.test(value);
+    const isValidName = /^[a-z\d]([a-z\d\-]{0,61}[a-z\d])?(\.[a-z\d]([a-z\d\-]{0,61}[a-z\d])?)*$/i.test(value);

should work

Regex was taken from https://stackoverflow.com/a/3824105

@RemiRigal
Copy link
Owner

Multilevel subdomains are now supported in the latest version of Yape, as well as path on top of the base URL.

Thank you @joshuajcoronado for your PR, I ended up not using the regex you proposed because of the important refactoring of the options page.

Feel free to give me feedbacks on this new feature.

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

No branches or pull requests

3 participants