Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

WebhttpRequest Not working on mobile browsers

 Post Reply Post Reply
Author
Morango Jose View Drop Down
New Member
New Member
Avatar

Joined: 15 Jul 2018
Posts: 19
Post Options Post Options   Quote Morango Jose Quote  Post ReplyReply Direct Link To This Post Topic: WebhttpRequest Not working on mobile browsers
    Posted: 11 Nov 2019 at 11:25am
Hi everyone,
I have a simple login form where I call a php file for authentication using webhttprequest.
On desktop browsers it work just fine, but when I try to login using for example my iphone ou android device then it does not work. No error is returned , login is not working. I supect this is a permission header missing for mobile browsers but not sure what to do, I add this lines of code in the PHP file :

        header("Access-Control-Allow-Origin: *");
        header('Access-Control-Allow-Credentials: true');
        header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
        header("Access-Control-Allow-Headers: *");

It work for desktop browsers but still not working in mobile browsers.

I'm stuck any idears.

Regards

Josť
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8383
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 2019 at 5:06pm
It is unclear what might be causing this.
I guess you are here working via a different network connection?
Is your PHP endpoint accessible via this network you use on the mobile device?
Do you see an error?
Back to Top
Motion Byte In View Drop Down
New Member
New Member
Avatar

Joined: 12 Nov 2019
Posts: 8
Post Options Post Options   Quote Motion Byte In Quote  Post ReplyReply Direct Link To This Post Posted: 12 Nov 2019 at 6:22pm
Hi Bruno,

I managed to make it work.

The PHP file that I'm calling is on a cloud server, the Webcore app is in the same server.
Howerver the webcore app is configured on IIS and the PHP on Apache in a diferent port.
what I did is to move everithing to the apache server and it working fine now in both desktop and mobile.


Thanks
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8383
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 12 Nov 2019 at 6:24pm
Thanks for informing!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down