Does obmc-ikvm work with bmcweb?

xiuzhi 1450335857 at qq.com
Thu Mar 14 13:21:17 AEDT 2019


Hi Jae, Ed,
    I updated the source to openbmc latest version which uses bmcweb instead of phosphor-rest.
   It seemed that ikvm cannot work on bmcweb.
The websit error:
app.bundle.js:43 Refused to connect to 'wss://192.168.200.132/kvm/0' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
Then I modify the bmcweb file include/security_headers_middleware.hpp L40:
        // The KVM currently needs to load images from base64 encoded strings.
        // img-src 'self' data: is used to allow that.
        // https://stackoverflow.com/questions/18447970/content-security-policy-data-not-working-for-base64-images-in-chrome-28
        res.addHeader("Content-Security-Policy",
                      "default-src 'self'; img-src 'self' data:");

to:
policy-data-not-working-for-base64-images-in-chrome-28
        res.addHeader("Content-Security-Policy",
                      "script-src 'self'; img-src 'self' data:");



The website erro:
"app.bundle.js:43 WebSocket on-error event"
"WebSocket connection to 'wss://192.168.200.132/kvmws' failed: WebSocket opening handshake timed out"
  What is wrong with it?
   Best,
Xiuzhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190314/7c3f932c/attachment.htm>


More information about the openbmc mailing list