Dear Maxim, May I know if we need to set the parameter for rest.allow.origin.
Is this parameter in the configuration? Sorry that I cannot find it in the configurations. Or is it in any xml file that we need to set? Thanks James > On 27 Dec 2017, at 6:46 PM, Maxim Solodovnik <solomax...@gmail.com> wrote: > > Please check comments for > https://issues.apache.org/jira/browse/OPENMEETINGS-1805 > <https://issues.apache.org/jira/browse/OPENMEETINGS-1805> for correct > parameter to set > > WBR, Maxim > (from mobile, sorry for the typos) > > On Wed, Dec 27, 2017, 17:45 James Chan <yue.c...@gmail.com > <mailto:yue.c...@gmail.com>> wrote: > Dear Maxim, > > After installed version 4.0.2. Unfortunately, it is still showing the the > same error when access from other machine. I have tested the code running on > the same machine but same error shows up. > > I have tried to modify the OM’s header.content.security.policy but without > any luck. > > May I know if other things that I can do? Thanks > > Best Regards, > James > > > > > >> On 26 Dec 2017, at 5:12 PM, Maxim Solodovnik <solomax...@gmail.com >> <mailto:solomax...@gmail.com>> wrote: >> >> https://builds.apache.org/view/M-R/view/OpenMeetings/job/OpenMeetings%204.0.x/ >> >> <https://builds.apache.org/view/M-R/view/OpenMeetings/job/OpenMeetings%204.0.x/> >> >> WBR, Maxim >> (from mobile, sorry for the typos) >> >> On Tue, Dec 26, 2017, 16:10 James Chan <yue.c...@gmail.com >> <mailto:yue.c...@gmail.com>> wrote: >> Thanks Maxim, >> >> As we need the fixed version 4.0.2 for integration. May I know if you can >> send me the links to download the unreleased 4.0.2? Thanks >> >> Best Regards, >> James >> >> >>> On 26 Dec 2017, at 4:40 PM, Maxim Solodovnik <solomax...@gmail.com >>> <mailto:solomax...@gmail.com>> wrote: >>> >>> https://issues.apache.org/jira/browse/OPENMEETINGS-1805 >>> <https://issues.apache.org/jira/browse/OPENMEETINGS-1805> >>> >>> On Tue, Dec 26, 2017 at 2:22 PM, Maxim Solodovnik <solomax...@gmail.com >>> <mailto:solomax...@gmail.com>> wrote: >>> Thanks for your example, just have tried it >>> >>> According to my tests >>> 1) REST API request is successfully processed on OM server (according to >>> logs) without any OM configuration modifications >>> 2) the error you are seeing: "No 'Access-Control-Allow-Origin' header is >>> present on the requested resource" is browser restriction [1] >>> >>> According to this [2] article, some modification of java code might help >>> Will try it and write back ... >>> >>> [1] >>> https://stackoverflow.com/questions/20035101/why-does-my-javascript-get-a-no-access-control-allow-origin-header-is-present >>> >>> <https://stackoverflow.com/questions/20035101/why-does-my-javascript-get-a-no-access-control-allow-origin-header-is-present> >>> [2] >>> https://www.codeschool.com/discuss/t/how-to-solve-no-access-control-allow-origin-header-is-present-on-the-requested-resource-origin-null-is-therefore-not-allowed-access-in-angular-js/28989/12 >>> >>> <https://www.codeschool.com/discuss/t/how-to-solve-no-access-control-allow-origin-header-is-present-on-the-requested-resource-origin-null-is-therefore-not-allowed-access-in-angular-js/28989/12> >>> >>> On Tue, Dec 26, 2017 at 1:51 PM, James Chan <yue.c...@gmail.com >>> <mailto:yue.c...@gmail.com>> wrote: >>> Dear Maxim, >>> >>> What I did is following the example: >>> >>> >>> The openMeetings is installed on a linux server with ip address: >>> 192.168.128.38 >>> >>> $('#div1').click(function () { >>> $.ajax({ >>> method: "GET", >>> url: >>> "http://192.168.128.38:5080/openmeetings/services/user/login >>> <http://192.168.128.38:5080/openmeetings/services/user/login>", >>> data: {user: 'gaoshusheng', pass: '$Admin123'}, >>> dataType: "json", >>> success: function(data){ >>> alert('success!'); >>> }, >>> error:function(jqXHR, textStatus, errorThrown){ >>> alert('error!'); >>> } >>> }); >>> }); >>> >>> After running these line of code on the browser. >>> >>> the script jump to: alert('error!’); >>> >>> Although from the debug browser reply, we can see the ID is already replied >>> with status “success”. But because the error, we are unable to continue >>> with the functions. >>> >>> The error shows: >>>> XMLHttpRequest cannot load >>>> http://localhost:5080/openmeetings/services/user/login?user=gaoshusheng&pass=%24Admin123 >>>> >>>> <http://localhost:5080/openmeetings/services/user/login?user=gaoshusheng&pass=%24Admin123>. >>>> No 'Access-Control-Allow-Origin' header is present on the requested >>>> resource. Origin 'http://localhost:9090 <http://localhost:9090/>' is >>>> therefore not allowed access. >>> >>> >>> >>> Best regards, >>> James >>> >>> >>>> On 26 Dec 2017, at 12:29 PM, Maxim Solodovnik <solomax...@gmail.com >>>> <mailto:solomax...@gmail.com>> wrote: >>>> >>>> I'm afraid I need something I can run and test ... >>>> Maybe you can send the link to example github project? >>>> >>>> On Tue, Dec 26, 2017 at 10:43 AM, James Chan <yue.c...@gmail.com >>>> <mailto:yue.c...@gmail.com>> wrote: >>>> Dear Maxim, >>>> >>>> >>>> The error shows: >>>> >>>> XMLHttpRequest cannot load >>>> http://localhost:5080/openmeetings/services/user/login?user=gaoshusheng&pass=%24Admin123 >>>> >>>> <http://localhost:5080/openmeetings/services/user/login?user=gaoshusheng&pass=%24Admin123>. >>>> No 'Access-Control-Allow-Origin' header is present on the requested >>>> resource. Origin 'http://localhost:9090 <http://localhost:9090/>' is >>>> therefore not allowed access. >>>> >>>> >>>> Best Regards, >>>> James >>>> >>>>> On 26 Dec 2017, at 10:36 AM, Maxim Solodovnik <solomax...@gmail.com >>>>> <mailto:solomax...@gmail.com>> wrote: >>>>> >>>>> Any additional error details? >>>>> >>>>> On Tue, Dec 26, 2017 at 8:38 AM, Yue Chan <yue.c...@gmail.com >>>>> <mailto:yue.c...@gmail.com>> wrote: >>>>> Dear Maxim, >>>>> >>>>> I have followed your instruction to set the parameters. However, the >>>>> error still exists. The jQuery call still jump to error. Is there other >>>>> things that I should do? >>>>> >>>>> Thanks and best regards, >>>>> >>>>> James. >>>>> >>>>> >>>>> >>>>> >>>>> On 23 Dec 2017 6:08 pm, "Maxim Solodovnik" <solomax...@gmail.com >>>>> <mailto:solomax...@gmail.com>> wrote: >>>>> I'm here to help ;) >>>>> >>>>> WBR, Maxim >>>>> (from mobile, sorry for the typos) >>>>> >>>>> On Sat, Dec 23, 2017, 17:06 James Chan <yue.c...@gmail.com >>>>> <mailto:yue.c...@gmail.com>> wrote: >>>>> Hi Maxim, >>>>> >>>>> Thanks for the feedback. >>>>> >>>>> >>>>> Best regards, >>>>> >>>>> James >>>>> >>>>> >>>>> >>>>>> On 20 Dec 2017, at 7:01 PM, Maxim Solodovnik <solomax...@gmail.com >>>>>> <mailto:solomax...@gmail.com>> wrote: >>>>>> >>>>>> Hello James, >>>>>> >>>>>> Please do not write personal emails (subscribe to user@ list >>>>>> http://openmeetings.apache.org/mail-lists.html >>>>>> <http://openmeetings.apache.org/mail-lists.html>) >>>>>> >>>>>> According to your question: you need to go to OM->Admin->Config >>>>>> and update "header.content.security.policy" configuration: >>>>>> http://openmeetings.apache.org/GeneralConfiguration.html >>>>>> <http://openmeetings.apache.org/GeneralConfiguration.html> >>>>>> >>>>>> >>>>>> On Wed, Dec 20, 2017 at 9:11 AM, James Chan <yue.c...@gmail.com >>>>>> <mailto:yue.c...@gmail.com>> wrote: >>>>>> Dear Maxim, >>>>>> >>>>>> I am trying to write a simple application, which having the following >>>>>> code: >>>>>> >>>>>> Environment: >>>>>> >>>>>> openmeetings version 4.0.1 running on linux in another server. >>>>>> $.ajax({ >>>>>> method: "GET", >>>>>> url: 'http://192.168.128.38:5080/openmeetings/services/user/login >>>>>> <http://192.168.128.38:5080/openmeetings/services/user/login>', >>>>>> data:{ >>>>>> user:’TestAccount', >>>>>> pass:’@TestingPass' >>>>>> }, >>>>>> dataType:'json', >>>>>> success:function (data) { >>>>>> alert('success'); >>>>>> }, >>>>>> error:function (d) { >>>>>> console.log(d); >>>>>> alert(d); >>>>>> } >>>>>> }); >>>>>> However, it is having the cross domain error. >>>>>> >>>>>> Could you please help to give me some pointers as I have been trying to >>>>>> search the web but with no luck. >>>>>> (Some suggest using allow-access-control-origin = ‘*’, does it mean I >>>>>> need to modify the openmeetings code?) >>>>>> >>>>>> >>>>>> >>>>>> Thanks >>>>>> >>>>>> James >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> WBR >>>>>> Maxim aka solomax >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> WBR >>>>> Maxim aka solomax >>>> >>>> >>>> >>>> >>>> -- >>>> WBR >>>> Maxim aka solomax >>> >>> >>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >>> >>> >>> -- >>> WBR >>> Maxim aka solomax >> >