Support #8151
XMLHttpRequest error
0%
Description
I'm trying to add my Wt-based widget to an existing HTML page. I create and start a local server with default configuration file on my laptop and call
"hello.exe --http-address=127.0.0.1 --http-port=8080 --deploy-path=/hello --docroot=."
in html I write this:
///////////////////////////////////////////////////////////////////////////////////////////////////
....
<!-- End hidden fields for Wt's internal path API -->
<!--
We need a place holder for every widget to which we want to bind
a WContainerWidget in Wt
-->
<!--
As the last step, we load our application.
-->
///////////////////////////////////////////////////////////////////////////////////////////////////
The browser can't show my embedded widget with the following error:
Access to XMLHttpRequest at 'http://localhost:8080/hello.js?wtd=i7XwnllcOtORsO7n&wtt=widgetset' from origin 'null' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
How to fix it?
Files