Open anubister opened 6 months ago
The problem seems to come from the new URL validation using pydantic : https://github.com/YunoHost/yunohost/blob/bookworm/src/utils/form.py#L1230C1-L1257C1 ; might be from upstream (Debian 12 is packaging 1.10.4-1 but there is now a v2 which brings deep change (rely on another lib to validate URLs).
In the meantime, I would like to propose to consider URL as a string, applying the previous simple regex validation. Without regex validation it does work, but when trying to apply the regex:
class URLOption(BaseStringOption):
type: Literal[OptionType.url] = OptionType.string
pattern = {
"regexp": r"^https?://.*$",
"error": "config_validate_url", # i18n: config_validate_url
}
I get the following error and not familiar with pydantic:
TypeError: The type of URLOption.pattern differs from the new default value; if you wish to change the type of this field, please use a type annotation
could anyone provide support?
Unable to install in mode 'reverse-proxy' on Yunohost 12
It does not install due to "invalid URL" for target parameter (while this parameter is accepted on Yunohost 11).
Context
Steps to reproduce
yunohost app install redirect -a "domain=bosh.domain.tld&path=/http-bind&target=http://localhost:5290/http-bind&redirect_type=reverseproxy" -l BOSH
I tried also:
yunohost app install redirect -a "domain=bosh.domain.tld&path=/http-bind&target=http://localhost:5290&redirect_type=reverseproxy" -l BOSH
Pick a valid value for the argument 'target': URL host invalid
Expected behavior
As it does on Yunohost 11; goal is to redirect as recommended here : https://forum.yunohost.org/t/unable-to-set-up-bosh-conf-nginx/12995/2
Logs
When command is ran from CLI with --debug: