且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将身份验证标头添加到 $window.open

更新时间:2021-08-21 23:45:51

我认为您可以在 URL 中添加此身份验证参数并在您的服务器端执行 GET

I think you can add this authentication parameters in URL and do a GET in your server side

//Add authentication headers as params
var params = {
    access_token: 'An access_token',
    other_header: 'other_header'
};

//Add authentication headers in URL
var url = [url_generating_pdf, $.param(params)].join('?');

//Open window
window.open(url);