-
AuthorPosts
-
February 16, 2020 at 7:43 am #44520
ShamirParticipantHi,
I managed to build iOS. I emulated the same and I get the CORS error `Origin ionic://localhost is not allowed by Access-Control-Allow-Origin.
I followed your solution in adding the below code to wplms-customizer.php. Deactivated and Activated.
function add_cors_http_header(){
header(“Access-Control-Allow-Origin: *”);
}
add_action(‘init’,’add_cors_http_header’);But I get the same error.
I also followed tried the blow solutions by editing in .htaccess ONE by ONE:
Try 1: Header set Access-Control-Allow-Origin *
Try 2: <IfModule mod_headers.c>
Header set Access-Control-Allow-Origin *
</IfModule>
Try 3: Same as above but with “add” keyword.Now the error changes to ‘Access-Control-Allow-Origin’ header contains multiple values . Please note that I tried the above one by one. I have only one line in my .htaccess that has anything to do with access control header. (Please note that I commented the customizer plugin before trying.)
Please help me.
February 16, 2020 at 10:45 am #44531
ShamirParticipantI ran the app on actual device and the error remains the same. I checked the headers using https://www.webconfs.com/http-header-check.php and the result shows that Access-Control-Origin: * is enabled. Find below output from the same:
HTTP/1.1 200 OK =>
Date => Sun, 16 Feb 2020 10:38:55 GMT
Server => Apache/2.4.39 (cPanel) OpenSSL/1.0.2r mod_bwlimited/1.4 Phusion_Passenger/5.3.7
X-Powered-By => PHP/5.6.40
Access-Control-Allow-Origin => *
X-Robots-Tag => noindex
Link => ; rel=”https://api.w.org/”
X-Content-Type-Options => nosniff
Access-Control-Expose-Headers => X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers => Authorization, Content-Type
Allow => GET
Vary => Origin
Upgrade => h2,h2c
Connection => Upgrade, close
Content-Type => application/json; charset=UTF-8February 17, 2020 at 6:52 am #44558
Scott LangKeymasterHere is our config.xml:https://we.tl/t-fv512hJB94
We are able to log in and view the content of the app refer to this image:http://prntscr.com/r3cv9q
Yes, Access-Control-Allow-Origin => * is present.
The issue is caused by config.xml. Also please share your ios project(.xcworkspace) with us.
February 17, 2020 at 12:17 pm #44585
ShamirParticipantI will upload and share both the files shortly.
February 18, 2020 at 6:46 am #44625
Scott LangKeymasterrefer this reply:https://wplms.io/forums/topic/login-not-working/#post-44624
Also please reply here:https://wplms.io/forums/topic/login-not-working
February 25, 2020 at 10:31 am #45039
Scott LangKeymasterPlease reply only this topic:https://wplms.io/forums/topic/login-not-working/
-
AuthorPosts
- You must be logged in to reply to this topic.