Frequently Asked Questions
How to solve the problem if CORS (Cross-Origin Resource Sharing) occurs when App uses Ajax XmlHttpRequest?
Category: Technical FAQ
webOS TV follows the CORS (Cross-Origin Resource Sharing) standard. We only provide the method to control the access in the server.
Find out more about CORS on the enable-cors website.
You can refer to the following sites or other Google sites.
Cross-Origin Resource Sharing (CORS)
CORS Filter
Servers that supports CORS?
In case of JSP
Add the following at the JSP code of the service part.
As a result, jsp code should look like this:
Apache Server
-
Open httpd.conf file under the
conffolder at Apache server. -
Modify "#LoadModule headers_module modules/mod_headers.so" into "LoadModule headers_module modules/mod_headers.so".
-
Add the following at the end.
“*” means that access from any website is allowed. To allow a specific website only, use the form like "www.anysite.com".
To avoid cross domain issue, try using JSONP.