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

remove non fqdn check and alert #36

Closed
sk3pp3r opened this issue Nov 9, 2020 · 5 comments · Fixed by #57
Closed

remove non fqdn check and alert #36

sk3pp3r opened this issue Nov 9, 2020 · 5 comments · Fixed by #57

Comments

@sk3pp3r
Copy link

sk3pp3r commented Nov 9, 2020

when i put a short url from LAN e.g. http://localserver/app1, I get error:
Enter a valid URL.

running as docker container

what I'm asking is. can I enter URL that not start with www or not ending as http(s)://{hostnmae}.local.domain ?

@ArunYogesh
Copy link

Yes, i tried to put it behind a reverse proxy with a different url /links and it kept trying to navigate to domain/bookmarks instead of domain/links/bookmarks . i think there should be a way to specify the base url for this to work.

@sissbruecker
Copy link
Owner

@sk3pp3r Currently the bookmark form uses the default Django URL validation which seems rather strict in that it wants an internet address. This issue has come up before (see #22), so I can see the need to change this. Do you have an alternative suggestion for validation? It might also be an option to drop URL validation and just check for required. Also can you please specify what you mean by fqdn check and alert? Are you refering to the validation and error message that happens when you submit the form?

@ArunYogesh I think your issue is unrelated? It seems you are refering to the internal links that linkding generates, while this issue is about not being able to store bookmarks that do not follow a specific URL pattern. Can you please open a new issue if this is still relevant for you?

@sk3pp3r
Copy link
Author

sk3pp3r commented Dec 31, 2020

fqdn check - A fully qualified domain name (FQDN)
e.g.
https://www.youtube.com
in my local network : http://site1.my.lan should work with only http://site1

@sissbruecker
Copy link
Owner

@sk3pp3r Got it. Took a look at URL validation and it's a huge, complex topic (see here or here). Writing a custom URL validator is almost certain to miss a case that someone else needs.

On the other hand, since this is self-hosted and bookmarks are not shared, your are responsible for the stuff you enter and are the sole person affected by it. As such the easiest solution would be to provide an option to disable URL validation entirely. Then the default setup would keep validating URLs as it does now, while you have the option to disable URL validation if you want to use non-FQDN URLs or custom protocols. Agree?

sissbruecker pushed a commit that referenced this issue Feb 6, 2021
sissbruecker pushed a commit that referenced this issue Feb 6, 2021
* Add option for disabled bookmark URL validation (#36)

* Add options documentation (#36)
@sissbruecker
Copy link
Owner

Added an option to completely disable URL validation.

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

Successfully merging a pull request may close this issue.

3 participants