Changeset 120 in code for trunk/morty.go


Ignore:
Timestamp:
Jul 14, 2020, 9:22:08 PM (5 years ago)
Author:
asciimoo
Message:

[enh] allow opening urls without protocol scheme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/morty.go

    r119 r120  
    295295        }
    296296
     297        if parsedURI.Scheme == "" {
     298                parsedURI.Scheme = "https"
     299                requestURI = append([]byte("https://"), requestURI...)
     300        }
     301
    297302        // Serve an intermediate page for protocols other than HTTP(S)
    298303        if (parsedURI.Scheme != "http" && parsedURI.Scheme != "https") || strings.HasSuffix(parsedURI.Host, ".onion") {
Note: See TracChangeset for help on using the changeset viewer.