V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
xw

用 amazon s3 和 cloudfront 如何做防盗链?

  •  
  •   xw · Mar 18, 2014 · 6516 views
    This topic created in 4433 days ago, the information mentioned may be changed or developed.
    s3存文件、cloudfront为cdn,cloudfront如何做防盗链呢?可以设置Referer么?
    4 replies    2014-10-03 23:30:27 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Oct 3, 2014   ❤️ 3
    Livid
        2
    Livid  
    MOD
    PRO
       Oct 3, 2014
    有很多第三方库可以生成这样的带有防盗链签名的 signed URL,比如这里是一个 Node.js 的实现:

    https://github.com/jasonsims/aws-cloudfront-sign
    io565
        3
    io565  
       Oct 3, 2014 via iPhone
    相信楼主也做过功课,如果你想的是s3简单设置一下规则通过来源判定,没有的。
    ryd994
        4
    ryd994  
       Oct 3, 2014 via Android
    cdn一般都会设置fowarded-for吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5419 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 05:47 · PVG 13:47 · LAX 22:47 · JFK 01:47
    ♥ Do have faith in what you're doing.