Using Cloudinary with Heroku - heroku

I'm trying to use Cloudinary to handle the upload of images in my app. I created a Cloudinary account for it and this works perfectly in production.
I've deployed my app to Heroku and can't managed to successfully connect my Heroku app with Cloudinary. My app appears online but the images stored in Cloudinary don't display + the upload function doesn't work as well - i guess it's because the link with cloudinary is broken so the server doesn't know where to get the images or store the files.
I've first manually added the Cloudinary Url in Heroku's config vars and it didn't work. I then installed the Cloudinary add-on on Heroku and, when I install it in Ressources, Heroku redirects me to a newly created cloudinary account (it seems that adding the Cloudinary add-on to heroku creates a brand new Cloudinary account).
My problem is that I want to use my existing Cloudinary account in my Heroku app and I can't figure out how to connect both.
in my code, i'm storing my details in an env file, and on the server-side, I'm using my account details like so:
require("dotenv").config();
cloudinary.config({
cloud_name: process.env.CLOUD_NAME,
api_key: process.env.API_KEY,
api_secret: process.env.API_SECRET
});

Related

Error: Could not determine active Firebase project directory in firebase while switching account with firebase login:use

I used Firebase CLI to create a new firebase project for my flutter app. now, my client wants to use another email with it's own firebase project. That project already has the datas (production data) that I need. However after doing firebase login:add I have added both the emails, now when I do firebase login:use , I'm getting
Error: Could not determine active Firebase project directory
Having trouble? Try firebase [command] --help
in my cli. I hope my question was clear. thank you for reading this far.
Use this command: firebase login --reauth
It generates a link on the terminal which redirects you to Google Sign In on the web, where you can choose an new account to log in with.

Issues with environment setup for AWS SES at Laravel Vapor application

So I am trying to setup AWS SES for my application mails which is hosted at Laravel Vapor.
Current setup is something like this:
ENV FILE
MAIL_MAILER=ses
AWS_ACCESS_KEY_ID="my_iam_access_key"
AWS_SECRET_ACCESS_KEY="my_iam_secret_access_key"
AWS_DEFAULT_REGION=us-east-1 (I have left this one as it was previously filled)
At my LARAVEL VAPOR DASHBOARD
MAIL_DRIVER=ses
MAIL_MAILER=ses
MAIL_FROM_NAME="Name I Want"
MAIL_FROM_ADDRESS="Email I Want"
Since this is my first time of working with AWS I have followed few articles on how to do this setup but none seems to be working.
After all this setup, when I try to reset my password (which includes sending email), I get this error:
I have also made new IAM user (just in case there was issue with old keys) but it did not help and I have also verified my email at "Verified identities".

Netlify-React-Env vars

I have a Strapi backend hosted at heroku.
I'm hosting the frontend on Netlify. Which is a React App.
The env var on netlify is a link to the backend on heroku so that I can get data from strapi. All this work on dev build.
But when I spin up the site on Netlify. Netlify adds the Netlify link to the post or get requests like this https://unrivaled-pixie-6fa040.netlify.app/%22https://frozen-everglades-98.herokuapp.com/api/%22auth/local
and I only want the last one: "https://frozen-ades-98.herokuapp.com/api/auth/local
Anyone that knows more about this then me?

Heroku Basic Authentication of Gatsby App

I have a Gatsby app that I've deployed to Heroku and I'd like to enable basic auth to restrict access to the whole app. Is this possible on Heroku with Gatsby?
I was able to solve this by implementing onCreateDevServer in Gatsby-node.js and adding express-basic-auth to the project.
You could consider setting up a rest-api on heroku like this one here https://github.com/smakosh/not-todo-api/ and retrieve the token from your front end

Empty response from an app created in heroku

When creating a facebook app and using heroku service. The heroku app is returning an empty response. I have tried creating many apps but all have the same problem. I am using PHP in heroku.
To resolve this problem I cloned the git repository of my app from heroku, made some changes in some files by adding few random spaces so that they are identified as a different version from the cloned files. Then i pushed the repo back to heroku. Now the app worked fine.

Resources