pips- / shuri

Simple url shortener script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for HTTPS

silentsilas opened this issue · comments

commented

Noticed that the shortened URL only uses http. I'll probably submit a PR later to let the short URL use https if $_SERVER['HTTPS'] == true, though I hear that's not 100% reliable for some PHP installations.

commented
commented

Ah, that's an even better solution than checking the HTTPS variable.

Edit: And yes, I meant the provided URL after shortening.

commented

I tried it out, and it seems the QR code may not work as a URL properly. Some readers require http:// or https:// to handle it as a link.

my.domain.com/page -> some QR code scanners treat it as a string, some as a URL
//my.domain.com/page -> All of my QR code scanners treat it as a string

commented

oh right, I didn't think about that. So we should rely on $_SERVER['HTTPS'] hopefully it will mostly works everywhere.

I will take a look at your PR, thanks. :)