Trying to use AppConfigurationClient to get "getConfigurationSetting" in my React App but getting CORS on localhost:3000
Trying to use AppConfigurationClient to get "getConfigurationSetting" in my React App but getting CORS on localhost:3000.
If I create a simple "js project or dotnet project I can access the exact same store. If I use React I get a CORS error
await client.getConfigurationSetting({ key: ".appconfig.featureflag/MyFeature"
Does Azue App Configuration all access from REACT and if so ... How do I make it happen?
App configuration allows access from all origins. Could you please check whether the preflight request is correctly issued?
Preflight returned a 204
On Mon, Feb 19, 2024 at 12:05 AM Richard chen @.***> wrote:
App configuration allows access from all origins. Could you please check whether the preflight request is correctly issued?
— Reply to this email directly, view it on GitHub https://github.com/Azure/AppConfiguration/issues/872#issuecomment-1951759304, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7XBP6ANIPCJZBBHQUWIG6TYULTRLAVCNFSM6AAAAABDG3FNMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRG42TSMZQGQ . You are receiving this because you authored the thread.Message ID: @.***>
@Eskibear @RichardChen820 can one of you reproduce the issue?
I cannot reproduce it with a simple React project. @MarcusNRoss Can you share a sample project/code that you get a CORS error?
Yes I can but, will need a little time to get back to it.
I had to leave it for the time being due to other projects.
Are you able to send the sample react project you used? At least the config or package versions?
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Thu, Feb 22, 2024 at 12:22 AM Yan Zhang @.***> wrote:
I cannot reproduce it with a simple React project. @MarcusNRoss https://github.com/MarcusNRoss Can you share a sample project/code that you get a CORS error?
— Reply to this email directly, view it on GitHub https://github.com/Azure/AppConfiguration/issues/872#issuecomment-1958781043, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7XBP6FO4BTEWHI3E3776TDYU3P3JAVCNFSM6AAAAABDG3FNMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJYG44DCMBUGM . You are receiving this because you were mentioned.Message ID: @.***>
Here it is: react-sandbox.zip Attaching the sample project I was using, copied from React tutorial https://react.dev/learn/tutorial-tic-tac-toe#setup-for-the-tutorial
Fill in your connection string (not suggested for real app, only for testing purpose) and feature name in file App.js, run npm ci and npm run start to test it.
BTW there is React samples in JavaScript SDK repo, see if that works in your scenario. @MarcusNRoss
@MarcusNRoss are you able to narrow down the issue? Is there anything else we can help?
@MarcusNRoss please let us know when you have more information to share. Closing for now.
I will try to get back to it this week. Due to competing projects we put this issue on hold
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Sat, Mar 16, 2024 at 7:21 PM Zhenlan Wang @.***> wrote:
@MarcusNRoss https://github.com/MarcusNRoss please let us know when you have more information to share. Closing for now.
— Reply to this email directly, view it on GitHub https://github.com/Azure/AppConfiguration/issues/872#issuecomment-2002201730, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7XBP6CTDGMWAFCASKCH6GDYYTOW5AVCNFSM6AAAAABDG3FNMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGIYDCNZTGA . You are receiving this because you were mentioned.Message ID: @.***>
Good morning.... this is where I have picked back up.. [image: image.png]
On Sat, Mar 16, 2024 at 7:21 PM Zhenlan Wang @.***> wrote:
@MarcusNRoss https://github.com/MarcusNRoss please let us know when you have more information to share. Closing for now.
— Reply to this email directly, view it on GitHub https://github.com/Azure/AppConfiguration/issues/872#issuecomment-2002201730, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7XBP6CTDGMWAFCASKCH6GDYYTOW5AVCNFSM6AAAAABDG3FNMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGIYDCNZTGA . You are receiving this because you were mentioned.Message ID: @.***>
[image: image.png]
@MarcusNRoss I cannot see the image. Probably you need to reply on GitHub instead of via email.