如何在window.open()中传递授权承载令牌标头?

时间:2020-10-22 04:27:13

标签: python jquery django-templates window.open request-headers

我需要在jquery的window.open()中将Authorization Bearer令牌标头从父窗口(在http:// localhost:5001中运行)传递到子窗口(在http:// localhost:5000中运行)。 / p>

jQuery(document).ready(function(){
  var width = "600";
  var height = "800";
  var left = (screen.width / 2) - (width / 2);
  var top = (screen.height / 2) - (height / 2);
  var pop_win = window.open('http://localhost:5000', '_system', 'width=' + width + ', height=' + height + ', top=' + top + ', left=' + left);
})

需要在http:// localhost:5001中添加Authorization Bearer令牌标头,并在http:// localhost:5000中获取它

如何实现?

0 个答案:

没有答案