Skip to main content

Posts

Showing posts from 2019

How to configure godaddy domain on heroku via cloudflare

Here is how I did it from scratch. Step 1: Setting Up Heroku and Godaddy The first step is adding the GoDaddy domain to the Heroku app. Login to heroku and navigate to the app settings, under domain section click on "Add domain" then type "www.yourdomain.com" & "yourdomain.com". The domain name is the one purchased from GoDaddy. Step 2: Setup cloudflare Go to cloudflare, add a domain you want to point via cloudflare (domain added in  step 1).When you add domain cloudflare will automatically fetch all the sever records and provide you with  NS.Addiotnally point heroku via CNAME/ANAME to heroku app. Step 2: Copy NS from godaddy to cloudflare Log into GoDaddy account and go to your domain detail page.The domains details page will show all the DNS related to the domain name.Copy NS from step 2 (cloudflare) &  paste it in godaddy under custom NS option. That's all.

Sending Emails in Laravel with Gmail SMTP

This post will help you to fix issue like  Error : Swift_TransportException in StreamBuffer . php line 268 : Connection could not be established with host smtp . gmail . com [ Connection refused #111] Sending emails is crucial for any web application. Usually, an email is sent to notify the user of some kind of activity.Here are the steps to send email in laravel using Gmail SMTP. Generally Gmail is not recommended to send emails on live server, but if you just using it for testing purpose then follow these steps: 1. Visit   https://myaccount.google.com/security   make sure you have allowed  less secure app  to YES. 2. Unlock captcha on  https://accounts.google.com/b/0/DisplayUnlockCaptcha . 3. Generate APP password  Turn on 2-Step Verification for your account  https://myaccount.google.com/security. Your app might not support the latest security standards. Try changing a few settings to allow less secure apps access to your account. After enabling 2-Step V

Sensitive data in github

What is it? As one is committing the code to github , the developers must be aware that no credentials should be pushed with github .Even the repository is private but still it is not recommended to put your keys/password on github.The following reasons explain the reasons : This is very risky, exposing those credentials on a 3rd-party service that you don't control and manage then you are increasing the risk. There are lots of ways your credentials could be exposed: service compromise, compromised service accounts, authorization failure in the service, network eavesdropping, you granting access to the wrong person, etc.This leads huge risk to your company and it's reputation. How to find the suspected information As there are certain way of keys being exposed in the code statically , but simply search for parameters such as “KEY”,”API KEY”,”Password”,”credentials”,”phpinfo” etc , here we need to identify which files contain these information as static content .most