[英]How to pass request headers in HTML object tag?
I am trying to embed HTML page from a web application in my website using object tag. 我正在尝试使用对象标记将Web应用程序中的HTML页面嵌入到我的网站中。 Both website and the web application's HTML page are hosted in same domain. 网站和Web应用程序的HTML页面都位于同一域中。 I am trying to pass cookie information(basically jsessionid) from my website to the web application's HTML page. 我正在尝试将Cookie信息(基本上是jsessionid)从我的网站传递到Web应用程序的HTML页面。 I tried with embedding it in url, but the information is not getting passed. 我尝试将其嵌入url中,但信息没有通过。 Is there any alternative to achieve this or i am doing it in wrong way? 是否有其他选择可以实现这一目标,或者我做错了方法? Kindly direct me to the right way to achieve this. 请指导我实现此目标的正确方法。
There is no way to set arbitrary HTTP headers when requesting content using an <object>
. 使用<object>
请求内容时,无法设置任意HTTP标头。
The only time you can add HTTP headers is when using XMLHttpRequest
or fetch
but in those cases the cookie headers are protected and you cannot set them. 唯一可以添加HTTP标头的时间是在使用XMLHttpRequest
或fetch
但是在这种情况下,cookie标头受到保护,因此无法设置它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.