Heroku Website with Google API - Need IP? - heroku

I have a website that I wrote with react and pushed to heroku to host it while in development. The website uses the Google API -
When I get the API Key I need to specify the IP address that can get access to the api key. It was easy to put my own ip address in for my local server... but Idk what to put in for a website hosted on heroku. Can you help?

Related

API key does not allow access from IP (Heroku)

I'm currently trying to create a website that gets data from the Clash Royale game API (https://developer.clashroyale.com) but they ask my to give an IP address for my API authorization key.
The problem is that my website is hosted on Heroku, and Heroku has several (always changing and more than 10) IP's and I can only give 4 IP addresses on Clash Royale API.
When I give my person IP address and run my code the API is fetched without any problems, but when I push my code to Heroku and open my website, I get this error message:
Invalid authorization: API key does not allow access from IP xx.xxx.xxx.xxx
Is there any way to get a single IP address from Heroku so I can use always the same for my API authorization key?
I found the answer after hours of digging into the interweb :)
I simply used a thing called "Proximo" that apparently converges all of your websites possible IP's to one; see https://devcenter.heroku.com/articles/proximo

Permission denied to generate login hint for target domain when hosted on AWS

website link to assist in troubleshooting: http://ec2-54-227-148-233.compute-1.amazonaws.com/architect/
I'm trying to launch Anyplace Architect on my own server. I've gone into the google developer console and set my key & Authorized JavaScript origins to my site, but when I hit the site, I get the following:
In the developer console, I see:
Request URL:https://accounts.google.com/o/oauth2/iframerpc?action=listSessions&client_id=964916910124-bv0kcgd7lrbhblvc0okebbhahitnnerl.apps.googleusercontent.com&origin=http%3A%2F%2Fec2-54-227-148-233.compute-1.amazonaws.com&scope=openid%20profile%20email&ss_domain=http%3A%2F%2Fec2-54-227-148-233.compute-1.amazonaws.com
Request Method:GET
Status Code:400
Remote Address:10.15.8.202:8080
Referrer Policy:no-referrer-when-downgrade
When I lunch locally it works perfectly, and I don't even see that request within networking tab on the developer console in chrome.
Both localhost:5000 & the AWS site are on the approved list from google
UPDATE:
This might just be my ignorance of how the sign-in tool works, but I've been able to find out the calls for localhost and my hosted environment are different. The localhost address goes to google.com/signin/oauth/oauthchooseaccount:
https://accounts.google.com/signin/oauth/oauthchooseaccount?client_id=964916910124-bv0kcgd7lrbhblvc0okebbhahitnnerl.apps.googleusercontent.com&as=woofRlZRVjxqKYzi0Xbttw&destination=http%3A%2F%2Flocalhost%3A5000&approval_state=!ChRhQmpLNEZRVHZJVEo2TW4xUHZwbhIfd3hHcnJMMDRJYlVkMEs2dFEwd1Nsa3YxeWR4ZUt4WQ%E2%88%99AB8iHBUAAAAAWs-i2_Lj-7nWLqvZjcwt3RArM0a3r6wB&xsrfsig=AHgIfE9BSG8q4mj-GBLin4PQT5-zv5fhhQ&flowName=GeneralOAuthFlow
while the hosted goes to google.com/o/oauth2/auth
https://accounts.google.com/o/oauth2/auth?redirect_uri=storagerelay%3A%2F%2Fhttp%2Fec2-54-227-148-233.compute-1.amazonaws.com%3Fid%3Dauth422135&response_type=code%20permission%20id_token&scope=openid%20profile%20email&openid.realm=&client_id=964916910124-bv0kcgd7lrbhblvc0okebbhahitnnerl.apps.googleusercontent.com&ss_domain=http%3A%2F%2Fec2-54-227-148-233.compute-1.amazonaws.com&access_type=offline&include_granted_scopes=true&prompt=consent&origin=http%3A%2F%2Fec2-54-227-148-233.compute-1.amazonaws.com&gsiwebsdk=2
I was facing same problem for ec2 url, It was working in localhost.
Here's what you can do.
Get IP address - (more preferably Elastic IP as ec2 IP changes with every reboot).
use magic domain - xip.io or nip.io
Ex. your IP address 11.12.0.0 becomes => http://11.12.0.0.xip.io or http://11.12.0.0.nip.io
Use above adress in google and in your browser.
Cheers

Heroku custom domain

Would like to learn how website works.
Purchased a domain name from bigrock domain registrar.
Am used to deploy applications to Heroku for my official websites.
But this is my personal site deployed to Heroku.
But how to connect my domain name to heroku ?
Heroku documentation is not clear to me.
I tried domain forwarding after playing with google search, but my site http://www.prithvibhargav.com/ is still giving me blank page.
Where as the heroku default website address still works
http://afternoon-cove-8287.herokuapp.com/
How to make my domain name to connect to heroku and work ?
There are so many terminoliges people use which is confusing
CName , A address, 301 redirect, domain forwarding
Which one to choose ?
You need to set your DNS to point to your heroku address. You should be able to go into the DNS settings in bigrock (where you registered the domain) and create CName record that will forward from your domain (http://www.prithvibhargav.com) to the heroku address (http://afternoon-cove-8287.herokuapp.com/)

"Facebook Store" Extension for magento is not connecting to localserver?

I have installed a magento extension to connect my magento store to facebook store. I want to test the functionality in localhost before I set it in live server. This is the extension I have installed in local.
http://connect20.magentocommerce.com/community/fbshops
This is the error I am facing with the facebook extension.
Error! You are using local host, or your IP is not accessible from outside, please contact your hosting provider.
Is there any way available to test this facebook module in localserver ?
I am using magento 1.7.
You will need to make your IP accessible to the outside world, this you can do if you have a static IP. You will need to forward all the request to your IP by port forwarding it to the web server.
And you will have to use your External IP Address instead of localhost in magento to check this. You can get your external ip address from here.

IP Address Restriction in Bonsai ElasticSearch as a Heroku Addon

I have started using Heroku's addon for ElasticSearch, Bonsai. I want to create a backend search for several categories on my website. Since this is a backend only service, and may contain sensitive information, how do I limit the IP addresses connecting to the Bonsai server that Heroku has provided me to only the IP address/range of my web servers.
Note that my web servers are running on private hardware and are not hosted on a cloud service. I am also not using any other web service on Heroku, so I prefer not to use a Ruby answer to this.
I ended up working with the Bonsai team to set up a custom solution on their end that required a username and password combination to access any data on my hosted search.

Resources