简体   繁体   中英

Unable to access a custom header in HTTP response

I have a node js server in which i am setting a custom header. To allow it to be accessed by browser i have set Access-control-expose-header. Using this i am able to get the header in Chrome Firefox but it is giving a error in Phantomjs "Refused to get unsafe header". How can i get around this?

To get around this you need to set 'webSecurityEnabled' header as 'false' in options while opening a page using PhantomJs.

Checkout the options listed here https://github.com/nathanboktae/mocha-phantomjs#usage

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM