Yape icon indicating copy to clipboard operation
Yape copied to clipboard

Multi-level subdomains not supported.

Open nautmichio opened this issue 3 years ago • 2 comments

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

nautmichio avatar Feb 28 '22 16:02 nautmichio

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

joshuajcoronado avatar Mar 25 '22 19:03 joshuajcoronado

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.

RemiRigal avatar Sep 08 '22 13:09 RemiRigal