• Resolved aprods

    (@aprods)


    Hi
    I am on local host on https://domain.test
    Postman request work as expected but with app call i get this
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://domain.test/jwt-auth/v1/token?username=XXX&password=XXXXXXXX

    the server config is:

    location ~ \.php$ {
             try_files        $uri =404;
             fastcgi_pass     
             unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock;
             fastcgi_param    SCRIPT_FILENAME 
             $document_root$fastcgi_script_name;
             fastcgi_pass_header Authorization;
             fastcgi_param HTTP:Authorization $http_authorization;
             include          fastcgi_params;
         }

    And the ajax cal is like this

    {
            url: 'https://domain.test/jwt-auth/v1/token',
            method: 'post',
            params: {
                username:'XXX',
                password:'XXXXXXXXX
            },
            headers:{
                'Access-Control-Allow-Origin':'*'
            }
          }

    Any Idea what wrong?

    Thanks

    • This topic was modified 3 years, 8 months ago by aprods.
    • This topic was modified 3 years, 8 months ago by aprods.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘CORS request did not succeed’ is closed to new replies.