skypyb
V2EX  ›  问与答

github 仓库里的 README.md 究竟该如何访问设置了防盗链的阿里云 oss 中存的图片

  •  
  •   skypyb · Jan 29, 2019 · 2300 views
    This topic created in 2718 days ago, the information mentioned may be changed or developed.

    试了好多种不同规则的防盗链白名单,README.md 仍无法正确显示图片。
    看了一下网页里的链接,从我设置的访问 oss 图片的链接变成这个开头的了:camo.githubusercontent.com
    当然,这个域名设白名单仍然没用。

    google 了一下,没有收获

    7 replies    2019-01-29 23:03:29 +08:00
    mmdsun
        1
    mmdsun  
       Jan 29, 2019 via Android
    一般防盗链是判断 HTTP_REFERER 的。看一下自己的 HTTP_REFERER 或者提工单问客服。
    Yourshell
        2
    Yourshell  
       Jan 29, 2019   ❤️ 1
    skypyb
        3
    skypyb  
    OP
       Jan 29, 2019
    @Yourshell 老哥我试了下直接给 https://help.github.com/ 白名单也没用。
    skypyb
        4
    skypyb  
    OP
       Jan 29, 2019
    @mmdsun 就是不知道 github 在请求我图片时到底是个啥请求头 = =
    Trim21
        5
    Trim21  
       Jan 29, 2019 via Android   ❤️ 1
    @skypyb If an image is being served from a private network or from a server that requires authentication, it can't be viewed by GitHub. In fact, it can't be viewed by any user without asking them to log into the server.

    To fix this, please move the image to a service that is publicly available.
    skypyb
        6
    skypyb  
    OP
       Jan 29, 2019 via Android
    @Yourshell 那这是没办法了..看来得改图片存放位置了。非常感谢解答。
    skypyb
        7
    skypyb  
    OP
       Jan 29, 2019 via Android
    @Trim21
    那这是没办法了..看来得改图片存放位置了。非常感谢解答。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1488 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 243ms · UTC 16:44 · PVG 00:44 · LAX 09:44 · JFK 12:44
    ♥ Do have faith in what you're doing.