https now automatically added if not present #1

Merged
swaggboi merged 2 commits from :main into main 2023-11-14 01:58:30 +00:00
Showing only changes of commit 278924da0d - Show all commits

View file

@ -1,7 +1,7 @@
my $starts-with-protocol = rx:i/ ^https?\:\/\//;
my $starts-with-protocol = rx:i/ ^https? '://'/;
sub fix-protocol ($url) is export {
return "https://" ~ $url unless $url ~~ $starts-with-protocol;
return "http://" ~ $url unless $url ~~ $starts-with-protocol;
}
# I use a dedicated method to remove all debugging messages prior to commit