doulangchao8934 2009-12-20 22:58
浏览 51
已采纳

带有CDN的远程服务器的标头

I have a CDN that is storing media files. Each file I want to store as just the ID number of the file in the data so, file.zip = 4423342 on the server. The problem is, the CDN does not allow php or any form of programming. How can I make it so I have a local file that is used to set the headers and let me change it so when they download a file from the CDN it downloads as file.zip instead of 4423342. Now I know this is simple if the file is stored on the same server as the file that sets the headers.

Thanks!

  • 写回答

1条回答 默认 最新

  • dongpao5261 2009-12-20 23:12
    关注

    If your CDN doesn't allow you to set the name/headers of the stored file, you cannot do it on your server. The user gets directed to the CDN server, and you can't "inject" anything into that connection.

    I would look into looking up the options your CDN does offer. For example, you might be able to append something like /file.zip to the end of the CDN url, and still get the correct file.

    That is – if the CDN url is http://cdn.example.com/113312, maybe http://cdn.example.com/113312/file.zip works as well.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化