Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud9 Rails API challenge: allowed network but still cannot render console

I am following along with this Treehouse Build a Rails API course. I am using Cloud9 IDE which I think is related to the problem. The step I am stuck on is creating a new list via the API in the console.

At first I was receiving an error message saying "cannot render console" from the network. After googling this, I whitelisted the network in the development.rb file. The error message is different and so I believe I properly whitelisted it (or at least did something). But it does not have the desired effect and the error message seems to contradict itself.

Started POST "/api/lists" for 123.456.78.999 at 2015-09-14 14:53:33 +0000 Cannot render console from 123.456.78.999! Allowed networks: 123.456.78.999, 127.0.0.0/127.123.123.123, ::1

I've changed the numbers because I am not savvy about security. The point (and to me, the mystery) is that it says I can't render the console from a network that is apparently allowed (i.e., 123.456.78.999 === 123.456.78.999).

I would appreciate any advice on what could be the problem. I had no trouble following along with the tutorial until this step; the commands I entered led to the same result as in the videos.

This is the most recent command I've entered:

curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"title":"The Title will go here"}' https://myapp-me.c9.io/api/lists

Entering that URL instead of "localhost" has worked for me thus far but it could also be related to the problem.

Thank you for any clues and happy to post additional code if needed.

like image 669
Leo Folsom Avatar asked Apr 10 '26 04:04

Leo Folsom


1 Answers

please add in config/enviroments/development.rb

config.web_console.whitelisted_ips =   '0.0.0.0/0.0.0.0'
like image 52
ion Avatar answered Apr 12 '26 19:04

ion



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!