CORs error when connecting Azure Spring Apps Backend to Frontend

Srikar Mahankali 5 Reputation points

I built a few spring boot microservices and spring-cloud gateway and was looking to deploy them somewhere. I followed this tutorial: closely. I was able to deploy all my microservices and spring-cloud gateway on the spring apps instance.

However, I kept facing CORS errors when I was integrating my Vue.js frontend to the spring-cloud gateway. I am using the public url assigned. I am aware of what CORS is, but I am not sure how to fix it. I have looked at most of the documentation, but could not find anything helpful. I am on the Standard pricing tier.

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
93 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 18,331 Reputation points

    Srikar Mahankali Thanks for posting your question in Microsoft Q&A. From the description above, you are using Standard pricing tier and I assume you followed sample in implementing microservices as well as spring cloud gateway.

    If so, you need to configure application with to allow CORS requests to the gateway and refer tutorial for detailed instructions.

    In the pet clinic sample, add the CORS properties in to allow public URL of the front-end application.

    I hope this helps and let me know if any questions.

    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    0 comments No comments