Do not propagate headers on HTTP redirects

前端 未结 2 1794
既然无缘
既然无缘 2021-01-05 14:51

I have files hosted on Amazon S3, and I\'d like to download them after a treatment in my app. This app view requires the HTTP Authorization header to proceed. Here is the pr

相关标签:
2条回答
  • 2021-01-05 15:12

    Is your S3 file path on the same domain as your /file/xxx? That would explain why the Authorization header is being sent, presumably. If you have your S3 hosted on a different domain to the app view, then I would assume the Authorization header would not be sent to the S3 domain (as HTTP Authorization is per-domain).

    0 讨论(0)
  • 2021-01-05 15:20

    It may depend on your client, for example see: https://code.google.com/p/go/issues/detail?id=4800

    It appears curl won't carry over your Authorization header by default. But I'm dealing with a similar issue and I see that by default http components appears to carry it.

    0 讨论(0)
提交回复
热议问题