CORS error in public server

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

CORS error in public server

shibsankar
Hi

I have deployed my angular application in a  public server. 

and then whitelisted  the public server IP in wso2's api-manager.xml 



However, when I call  wso2  token API  from my angular application I am getting CORS error.

Please see the CORS error and WSO2 settings in the screenshot attached.

Could you please suggest what is wrong here and how to fix it?

Regards
Shib



  

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev

cors-trouble.png (67K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CORS error in public server

shibsankar
any comments on this?

Regards
Shib


On Mon, Jul 30, 2018 at 12:15 PM, shibsankar <[hidden email]> wrote:
Hi

I have deployed my angular application in a  public server. 

and then whitelisted  the public server IP in wso2's api-manager.xml 



However, when I call  wso2  token API  from my angular application I am getting CORS error.

Please see the CORS error and WSO2 settings in the screenshot attached.

Could you please suggest what is wrong here and how to fix it?

Regards
Shib



  


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: CORS error in public server

shibsankar
any comments on this, please?

Regards
Shib


On Tue, Jul 31, 2018 at 11:31 AM, shibsankar <[hidden email]> wrote:
any comments on this?

Regards
Shib


On Mon, Jul 30, 2018 at 12:15 PM, shibsankar <[hidden email]> wrote:
Hi

I have deployed my angular application in a  public server. 

and then whitelisted  the public server IP in wso2's api-manager.xml 



However, when I call  wso2  token API  from my angular application I am getting CORS error.

Please see the CORS error and WSO2 settings in the screenshot attached.

Could you please suggest what is wrong here and how to fix it?

Regards
Shib



  



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: CORS error in public server

Rukshan Premathunga
Hi Shib,

It seems like you have try to do a request to token api. CORS configuration done in the api-manager.xml not added to the token api by default and you have to do some changes to make it work.
Please refer following article which explain how to enable cors for token api.


Thanks and Regards

On Wed, Aug 1, 2018 at 9:22 PM, shibsankar <[hidden email]> wrote:
any comments on this, please?

Regards
Shib


On Tue, Jul 31, 2018 at 11:31 AM, shibsankar <[hidden email]> wrote:
any comments on this?

Regards
Shib


On Mon, Jul 30, 2018 at 12:15 PM, shibsankar <[hidden email]> wrote:
Hi

I have deployed my angular application in a  public server. 

and then whitelisted  the public server IP in wso2's api-manager.xml 



However, when I call  wso2  token API  from my angular application I am getting CORS error.

Please see the CORS error and WSO2 settings in the screenshot attached.

Could you please suggest what is wrong here and how to fix it?

Regards
Shib



  



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: CORS error in public server

shibsankar

It works when I whitelist localhost in wso2 api manager XML  and run from local.

But when I move the application to a public server and whitelist the public IP in wso2 api manager XML , it does not work.

My CORS configuration Is correct as per your link.

Issue is when I move my angular application to public server and whitelist the public server IP in wso2 api manager XML it throws error.


Please see the earlier screenshot for error message and IP white listing.

Regards
Shib

On Wednesday, August 1, 2018, Rukshan Premathunga <[hidden email]> wrote:
Hi Shib,

It seems like you have try to do a request to token api. CORS configuration done in the api-manager.xml not added to the token api by default and you have to do some changes to make it work.
Please refer following article which explain how to enable cors for token api.


Thanks and Regards

On Wed, Aug 1, 2018 at 9:22 PM, shibsankar <[hidden email]> wrote:
any comments on this, please?

Regards
Shib


On Tue, Jul 31, 2018 at 11:31 AM, shibsankar <[hidden email]> wrote:
any comments on this?

Regards
Shib


On Mon, Jul 30, 2018 at 12:15 PM, shibsankar <[hidden email]> wrote:
Hi

I have deployed my angular application in a  public server. 

and then whitelisted  the public server IP in wso2's api-manager.xml 



However, when I call  wso2  token API  from my angular application I am getting CORS error.

Please see the CORS error and WSO2 settings in the screenshot attached.

Could you please suggest what is wrong here and how to fix it?

Regards
Shib



  



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: CORS error in public server

shibsankar
any comments to this please ?

Regards
Shib

On Thu, Aug 2, 2018 at 1:45 PM, shibsankar <[hidden email]> wrote:

It works when I whitelist localhost in wso2 api manager XML  and run from local.

But when I move the application to a public server and whitelist the public IP in wso2 api manager XML , it does not work.

My CORS configuration Is correct as per your link.

Issue is when I move my angular application to public server and whitelist the public server IP in wso2 api manager XML it throws error.


Please see the earlier screenshot for error message and IP white listing.

Regards
Shib


On Wednesday, August 1, 2018, Rukshan Premathunga <[hidden email]> wrote:
Hi Shib,

It seems like you have try to do a request to token api. CORS configuration done in the api-manager.xml not added to the token api by default and you have to do some changes to make it work.
Please refer following article which explain how to enable cors for token api.


Thanks and Regards

On Wed, Aug 1, 2018 at 9:22 PM, shibsankar <[hidden email]> wrote:
any comments on this, please?

Regards
Shib


On Tue, Jul 31, 2018 at 11:31 AM, shibsankar <[hidden email]> wrote:
any comments on this?

Regards
Shib


On Mon, Jul 30, 2018 at 12:15 PM, shibsankar <[hidden email]> wrote:
Hi

I have deployed my angular application in a  public server. 

and then whitelisted  the public server IP in wso2's api-manager.xml 



However, when I call  wso2  token API  from my angular application I am getting CORS error.

Please see the CORS error and WSO2 settings in the screenshot attached.

Could you please suggest what is wrong here and how to fix it?

Regards
Shib



  



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
+94711822074


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev