How to use XmlHttpRequest from local file and prevent "Origin null is not allowed by Access-Control-Allow-Origin." ?

How to use XmlHttpRequest from local file and prevent "Origin null is not allowed by Access-Control-Allow-Origin." ?

rzr的头像
How to use XmlHttpRequest from local file and prevent Origin null is not allowed by Access-Control-Allow-Origin. ? I am in the process of creating a tizen app , and I want to perform a http query from my app , but it looks this is unsecure ... This action seems very basic, so I might have miss something ? I can explain further and provide a sample code if needed More to come later : -- http://rzr.online.fr/q/html5
-- http://rzr.online.fr/q/intel# Please support TiZen, native TiZen (qt,efl), android-x86, MeeGo, and other opensource projets...
5 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
Marvin O的头像

Hello,

I recommend the Official Tizen(TM) SDK Documentation for more details about application development process with step-by-step instructions including SDK basics.

Also, please refer to the Tizen* Legacy API Specifications and Tizen Device API: Tizen* documentation for technical resources.

Additionally, there is another software developer who posted a solution for a similar situation as yours while using Intel AppUp(R) Encapsulator 2.0 Alpha. Please check this thread.

You may contact the Tizen* Community for further assistance while developing your program targeted for Tizen operating system.

If you require more information, please let us know.

Marvin O.
Technical Support Team
Intel AppUp® Developer Program
Intel AppUp® center
*Other names and brands may be claimed as the property of others.

rzr的头像

thx for answering I did figure out by myself, I needed to add some extra meta data to project ...

I will document this on my tizen page

https://wiki.tizen.org/wiki/User:Rzr

now I have to find a way to keep some http credentials somewhere ...

-- http://rzr.online.fr/q/intel# Please support TiZen, native TiZen (qt,efl), android-x86, MeeGo, and other opensource projets...
michele tameni的头像

Hi rzr, my experience with credentials:

add withCredential = true to any xhr request, and make sure that your web server send Access-Control-Allow-Credentials: true header.

Also make sure that you have a valid domain in the Access-Control-Allow-Origin header filed. "*" will not work with credentials, and any cookie will be send back to the server.

michele tameni的头像

Hi rzr, my experience with credentials:

add withCredential = true to any xhr request, and make sure that your web server send Access-Control-Allow-Credentials: true header.

Also make sure that you have a valid domain in the Access-Control-Allow-Origin header filed. "*" will not work with credentials, and any cookie will be send back to the server.

登陆并发表评论。