skypyb
V2EX  ›  问与答

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

  •  
  •   skypyb · Jan 29, 2019 · 2557 views
    This topic created in 2840 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
    mmdsun
    Jan 29, 2019 via Android
    1
    一般防盗链是判断 HTTP_REFERER 的。看一下自己的 HTTP_REFERER 或者提工单问客服。
    Yourshell
    Yourshell
    Jan 29, 2019❤️1
    2
    skypyb
    skypyb
    OP
    Jan 29, 2019
    3
    @Yourshell 老哥我试了下直接给 https://help.github.com/ 白名单也没用。
    skypyb
    skypyb
    OP
    Jan 29, 2019
    4
    @mmdsun 就是不知道 github 在请求我图片时到底是个啥请求头 = =
    Trim21
    Trim21
    Jan 29, 2019 via Android❤️1
    5
    @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
    skypyb
    OP
    Jan 29, 2019 via Android
    6
    @Yourshell 那这是没办法了..看来得改图片存放位置了。非常感谢解答。
    skypyb
    skypyb
    OP
    Jan 29, 2019 via Android
    7
    @Trim21
    那这是没办法了..看来得改图片存放位置了。非常感谢解答。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   514 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 20:07 · PVG 04:07 · LAX 12:07 · JFK 15:07
    ♥ Do have faith in what you're doing.