Instagram + Heroku + Django + HTTP headers

2014-06-03 Thread Dr Shauny
Hi,

I have a Django/Python app that is hosted on Heroku. The app uses the 
Instagram API.

I am trying to secure the app by enforcing signed HTTP headers using 
X-Insta-Forwarded-For.

The actual header value is constructed as - "The expected value is a 
combination of the client's IP address and a HMAC signed using the SHA256 
hash algorithm with your client's IP address and Client Secret"

Does anyone know what IP information should be used for a Heroku hosted 
app? - the app IP is dynamic and unpredictable but the Instagram devs have 
told me that just an approximate IP is required, possibly only a Heroku 
gateway IP. How do I find out what is a suitable IP? (I dont want to use a 
proxy to fix the IP).

Also how do I actually add this header information to http headers? 
Middleware has been mentioned but I dont know where to start with coding a 
middleware solution. Is it possible to do this at the web server level on 
Heroku - would this be easier than middleware?

Anyone had experience of a similar setup that could give me some pointers 
here. All info much appreciated.

Thanks,

S.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d1af5890-29d5-4657-9bc1-219dcdeae473%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Help - Django App on Heroku & local dev machine

2014-05-28 Thread Dr Shauny
Hi,

I have a Django app already deployed and fully functional on Heroku. The 
app was purchased from a third party that transferred the codebase via 
github.

I need to make changes and redeploy the app but understand that this is not 
possible (or advisable) directly from github itself.

I therefore need to set up a local development environment for the app from 
where I can deploy changes to the github repository and also deploy updates 
to the installation on Heroku.

Heroku have an article that explains how to create a new app and upload 
this to Heroku ("Getting started with Django on Heroku") , however many of 
the details appear to be for a new app rather than for my situation where I 
already have a fully functional app. I am unsure as to what I should and 
shouldnt do as I am unclear about the relevancy of some of the instructions.

Can anyone walk me through the process of transferring an app from github 
to a local machine so that I can dev on the local machine. OS would be 
ubuntu 12.04 and ideally want to set up dev and prod repos on github (and 
eventually dev and prod apps on heroku). I believe I have done most of the 
local work with postgres, python virtualenv, heroku and django toolbelts 
etc, but would really appreciate an expert to bounce some queries off?

Anyone able to help?

S.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dd028ed1-7984-4ec5-822e-72da463640e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.