【问题标题】:Html 5 video play with http headers?带有http标头的HTML 5视频播放?
【发布时间】:2020-03-13 07:49:37
【问题描述】:

如何通过从带有 html 5 的链接添加标题来玩? 例如: xxxx.comv?v=36474,这个链接没有某些http头就打不开,我的问题是当我们想玩html5时,我们有机会添加这些http头吗? 我需要添加 hedaers:

"authority: xxx.xxx.xy" "user-agent: Mozilla" "sec-fetch-dest: empty" "accept: */*" "origin: https://www.yyyy.com" "sec-fetch-site: cross-site" "sec-fetch-mode: cors" "referer: https://www.yyyy.com/p4p.php?v=7f0baeb86d31f0bdb56d452d83020aaf52f0c7a1401c10ab10e4141629d9682b" "accept-language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7"

【问题讨论】:

  • 为什么这个标签是html5-video?!
  • 因为视频需要referer才能播放

标签: html http-headers html5-video


【解决方案1】:

只有非常有限的事情可以影响点击链接时发送的请求标头(例如使用rel="noreferrer"

您不能将任意标题设置为任意值。

如果您使用XMLHttpRequestfetch 而不是链接,则有设置标题的方法,但a number of the headers you want to set are forbidden,因此也不起作用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-02
    • 2013-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多