Hi,
I have deployed the application to Azure App service with Multi-tenant configuration.
I have added * in CORS at Azure Appservice
Lets say my client domain in question is : xyz.com api domain in question is : pqr.com
Problem : When I tried to load the host admin portal (http://app.xyz.com), the page console says "'http://pqr.com/AbpUserConfiguration/GetAll?d=1594195737260' from origin 'http://app.xyz.com has been blocked by CORS policy'"
However, when I tried to load the tenant portal (http://default.app.xyz.com), it works without any problem.
My config entries are as follows
"App": { "ServerRootAddress": "http://{TENANCY_NAME}.pqr.com/", "ClientRootAddress": "http://{TENANCY_NAME}.app.xyz.com/", "CorsOrigins": "https://app.xyz.com/,http://app.xyz.com/,https://.app.xyz.com/,http://.app.xyz.com/", "SwaggerEndPoint": "/swagger/v1/swagger.json", "AllowAnonymousSignalRConnection": "true" },
"remoteServiceBaseUrl": "http://{TENANCY_NAME}.pqr.com", "appBaseUrl": "http://{TENANCY_NAME}.app.xyz.com",
7 Answer(s)
-
0
Hi @Mahinthan,
You should define CorsOrigins as below;
"CorsOrigins": "https://app.xyz.com/,http://app.xyz.com/,https://*.app.xyz.com/,http://*.app.xyz.com/",
-
0
Hi @ismcagdas
Thanks for the response.
Sorry for my typo, where I missed the *
I have cross checked again and the CorsOrigns stands as you have stated. But still I'm getting the same error.
I got a work-around as follows When I tried to load the host admin portal as http://host.app.xyz.com, it works.
However, I'm, curious to know, how to get the host admin portal working with -> http://app.xyz.com
-
0
Hi @Mahinthan
The problem might be related to something else. Could you check server side log files to see if there are any error messages when you visit
http://app.xyz.com
? -
0
Hi @ismcagdas,
I have double-checked the logs in Azure Appservice. Its not throwing any errors.
-
0
-
0
Hi @ismcagdas,
I have sent you an email with the requested details.
Thanks
-
0
Hi @Mahinthan
Thanks, we will check it.