chigco
V2EX  ›  问与答

nginx 如何限制某些媒体资源或者限制下载

  •  
  •   chigco · Oct 8, 2016 · 3136 views
    This topic created in 3530 days ago, the information mentioned may be changed or developed.
    比如,我能使用页面取读取相对 url 路径,并且进行播放 http://xxxx.xxx/xxx.mp4

    并且无法使用工具下载 http://xxxx.xxx/xxx.mp4 或者浏览器直接访问。

    由于程序的关系,不能读取内部的物理路径。比如 /data/www/
    5 replies    2016-10-08 17:42:09 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Oct 8, 2016
    https://github.com/openresty/lua-nginx-module

    在 access_by_lua 里写规则。
    sutra
        2
    sutra  
       Oct 8, 2016
    Referer?
    chigco
        3
    chigco  
    OP
       Oct 8, 2016
    access_by_lua 写的话具体是个怎么样的思路,第一次遇到这一块,没有什么好想法。
    就想网站可以访问,但是不能使用工具下载。
    mN71eOOprFyMsnPx
        4
    mN71eOOprFyMsnPx  
       Oct 8, 2016
    搜索 google

    nginx 防盗链
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5173 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 09:39 · PVG 17:39 · LAX 02:39 · JFK 05:39
    ♥ Do have faith in what you're doing.