Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Argaw 2 posts 72 karma points
    1 day ago
    Argaw
    0

    CORS Issue with React App and Umbraco Heartcore - Configuration in Umbraco Cloud

    Hi Umbraco Community,

    I'm encountering a CORS issue between my React application and my Umbraco Heartcore project. My React app is running locally during development (e.g., http://localhost:3000), and I'm trying to make API requests to my Heartcore instance. However, I'm receiving CORS errors in my browser console, preventing my React app from fetching data and the same request works from Postman.

    I understand that CORS configuration for Heartcore is managed through the Umbraco Cloud portal, not via appsettings.json or any file access. I've logged into my Umbraco Cloud account, navigated to my Heartcore project's settings, and looked for options related to "Domains," "Hostnames," or "Custom Domains."

    I've added http://localhost:3000 to the allowed domains/origins in the Cloud portal. I've also tried variations like https://localhost:3000 and localhost:3000 just in case, but the issue persists.

    Here are some details about my setup:

    Umbraco Heartcore version: (If you know it, include it) React version: (e.g., React 18) Method of making API requests: (e.g., fetch) Steps I've already taken: (As described above) Could someone please provide guidance on how to correctly configure CORS for my Heartcore project in the Umbraco Cloud portal? Is there anything I might be missing? Any help would be greatly appreciated!

    Thanks in advance,

  • Afreed 74 posts 350 karma points
    23 hours ago
    Afreed
    0

    Hi Argaw,

    I haven't worked with Heartcore, If you got a kudu console from the cloud. Try adding custom headers for cors to allow any in the web.config itself.

Please Sign in or register to post replies

Write your reply to:

Draft