Phosphor Web-ui: Server unreachable - cross origin request blocked

Joseph Reynolds joseph-reynolds at charter.net
Wed Aug 8 00:37:46 AEST 2018


On 8/7/2018 5:13 AM, AKASH wrote:
>
> Message: 4
> Date: Tue, 7 Aug 2018 15:43:21 +0530
> From: AKASH G J <akashgj91 at gmail.com>
> To: Ed Tanous <ed.tanous at intel.com>
> Cc: openbmc at lists.ozlabs.org
> Subject: Re: Phosphor Web-ui: Server unreachable
> Message-ID:
> 	<CAE33tLHsd5HwrCS9qLXO6Mo_gzka1Mrv7vs3Ofy0AF=YRJdT1w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Ed,
>
> Sorry for the late reply. I was on leave for last week.
>
> I am hosting phosphor-webui on a different machine and trying to connect
> the BMC board using its IP address. I am using bmcweb platform. When I
> tried to login, the following message appeared in browser console.
>
> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the
> remote resource at https://<BMC-IP>/login. (Reason: CORS request did not
> succeed).
> <unavailable> activity-stream.bundle.js:3170:9
> CSI/tbsd_ cb=gapi.loaded_0:458:127
> CSI/_tbnd cb=gapi.loaded_0:458:127
> CSI/tbsd_ cb=gapi.loaded_0:458:127
> CSI/_tbnd cb=gapi.loaded_0:458:127
See 
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin.
I think the HTTP response header from phosphor-webui needs to include 
"Cross-origin resource sharing" headers such as:
Access-Control-Allow-Origin: <YOUR-WEB-HOSTING-MACHINE-IP>, 
<original-ip>    <-- or use *
   Access-Control-Allow-Credentials: true
   Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
   Access-Control-Max-Age: 3600
   Access-Control-Allow-Headers: Content-Type, Accept, X-Requested-With, 
remember-me

How would we enhance the phosphor-webui application to produce these 
headers?

> Thanks and Regards,
>
> Akash
> [...snip...]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20180807/395cc6da/attachment-0001.html>


More information about the openbmc mailing list