Suljettu

Configure Node.js server code to fix CORS error

I’m getting an error saying the following (below) from my server (Node/Express using Firebase Functions). I'm using Angular2 v7 on the front end. This cloud function seems to execute fine from my localhost, but not from my production server. I noticed the issue when new Stripe IDs (generated by a Cloud Function) were no longer being generated upon users creating a new account. However, they still get welcome emails sent to their email address (another Cloud Function). Everything was working fine until a few weeks ago; I ran into an issue where it wasn't updating my Firebase Functions when deploying my code so I had to delete the [login to view URL] before deploying to get that working again. Now it seems the createStripeCustomer Cloud Function is no longer executing for some reason, which normally runs automatically when a user creates an account, but I've isolated it for testing. Executing the function on my front-end (via a click) gives the error message below. I spent the entire day today trying multiple things but couldn't get it working. I'm open to using a desktop administration tool like TeamViewer so you can remote in and fix it.

CORS error message:

"[website] has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."

Pastebin of my [login to view URL] (Firebase Functions) code: [login to view URL]

(I replaced the website's name with 'website' in `const allowedOrigins` variable for the moment)

Taidot: Node.js, Express JS, Angular, Google Firebase, HTTP

Tietoa asiakkaasta:
( 19 arvostelua ) Antelope, United States

Projektin tunnus: #34408088

24 freelanceria on tarjonnut keskimäärin $24 tähän työhön

cielavsview

Hi! I just read your job description" Configure Node.js server code to fix CORS error " in detail. FEW DAYS AGO I HAVE WORKED WITH UK CLIENT AND IT SIMILAR TO YOUR PROJECT . I'm top MERN stack developer. I 'm good Lisää

$10 USD 5 päivässä
(2 arvostelua)
4.7
AlikAgaian

Hi, there. I am Alik and as you can see my profile, I am a tailent developer. I may be able to reply real-time about what you want to discuss for. Now as a manager of our team, 5 elite Full Stack master developers and Lisää

$15 USD 7 päivässä
(2 arvostelua)
4.2
arifuzzaman121

Greetings, Hope you are well. I've read your project description. I can do your project completely as you want. I'm very professional at server administration & programming. I'm in this profession for 3 years. I'm givi Lisää

$50 USD 1 päivässä
(2 arvostelua)
3.6
(2 arvostelua)
3.5
umairramees

I can help you via Anydesk. As I am seeing firebase function, it seems like that it should work. For now, I am not sure what is the problem. we need to debug step by step.

$15 USD 7 päivässä
(1 arvostelu)
1.9
danylovas

Hi. Passionate Full-Stack Developer here. I can do this project perfectly because I am fit for this project. My main frameworks are Angular and React. For backend: I am available in Node.js, Laravel, Django and Firebas Lisää

$15 USD 7 päivässä
(2 arvostelua)
1.9
(1 arvostelu)
2.0
dmyryzo

Hi Thanks for your job posting. I am a Backend developer who has 5+years experiences with Node.js platform. I had been developing many Backends for that time. So I am sure I can complete your Node project perfectly in Lisää

$15 USD 7 päivässä
(1 arvostelu)
1.4
NagarajTN

Hello Client,Quickly fix this issues,give work opportunnity, i can do fix this cors issues,i am reeady to start work now,i can provide best quality work,please chat now

$19 USD 1 päivässä
(3 arvostelua)
1.2
jamesohoff

✅✅ I am strongly interested in your project ✅✅ Hello, I am a senior Full-Stack developer with over 6 years of experience in both Backend and Frontend development with JavaScript Libraries and Frameworks, PHP and its M Lisää

$15 USD 7 päivässä
(1 arvostelu)
2.6
nitensolanki02

Dear, Client I have checked the project description carefully, I am very interested to work with you now. As I am a senior full-stack developer with 3+ years of experience, I have worked many web applications using fra Lisää

$15 USD 7 päivässä
(2 arvostelua)
0.8
singhakk98

Hi, A flexible and experienced web and mobile app developer dedicated to and background in creating new and original websites and mobile apps. I have five years of expertise in developing mobile apps and websites that Lisää

$15 USD 7 päivässä
(1 arvostelu)
0.5
coderrojina

Hi there, I already fall a cors error many times and I solve it with add a proxy name on the [login to view URL] file. And also I install cors package on node js and add the origin site name. I see your firebase index. js cod Lisää

$16 USD 1 päivässä
(1 arvostelu)
0.4
(0 arvostelua)
0.0
ahtshamshabir1

Hi, Thank you for your job posting. I am really interested in developing this project because I have solid experience with Node and Firebase and also carefully studied the details of this project. So I think I can be Lisää

$20 USD 1 päivässä
(0 arvostelua)
0.0
thewebgurusllc

Hello, I want to discuss with you on the idea and the scope of the project, please share you availability for project scoping and requirement gathering. Best.. Gabriel. Senior Developer [login to view URL]

$15 USD 7 päivässä
(0 arvostelua)
0.0
Kahmyl

I am a Software Engineer with 4 years of experience with Nodejs and Express js. I endeavor to develop quality and efficient applications to each and everyone of my clients.

$18 USD 2 päivässä
(0 arvostelua)
0.0
ignjatovic245

Hello. I've just read the description and understood what you want. I have 6+ years of experience as a full stack developer. I've encountered CORS errors many times. At that time, I solved that problem with excellenc Lisää

$20 USD 1 päivässä
(0 arvostelua)
0.0
seperatis

Hi, I am a software engineer with a wealth of knowledge and over 7 years of experience in web & cross-platform development. I read your project details carefully and I felt your project is very fit for my skill set. Lisää

$15 USD 1 päivässä
(0 arvostelua)
0.0
nhrDev

Hi there :) I'm Nowshad Hossain, a Full Stack developer and a WordPress plugin developer. I can fix that CORS error of your express app. Feel free to contact me. Have a nice day :)

$15 USD 1 päivässä
(0 arvostelua)
0.0