WordPress LMS for Web and mobile Forums Ionic App Support iOS is Blank (CORS Error)

iOS is Blank (CORS Error)

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #44520

    Shamir
    Participant
    Hi, 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.
    #44525

    Shamir
    Participant
    This reply has been marked as private.
    #44531

    Shamir
    Participant
    I 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-8
    #44558

    Scott Lang
    Keymaster
    Here 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.  
    #44585

    Shamir
    Participant
    I will upload and share both the files shortly.
    #44610

    Shamir
    Participant
    This reply has been marked as private.
    #44625

    Scott Lang
    Keymaster
    #44687

    Shamir
    Participant
    This reply has been marked as private.
    #45039

    Scott Lang
    Keymaster
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.