bkg / puppet-django Goto Github PK
View Code? Open in Web Editor NEWDeploy Django projects with Puppet
Deploy Django projects with Puppet
Set X-Forwarded- headers
on location that serves Django if ssl=true
nginx::resource::location { "name":
...
proxy_set_header => ['X-Forwarded-Proto $scheme',
'X-Forwarded-For $proxy_add_x_forwarded_for',
'Host $http_host',]
...
}
Django relies on the X-Forwarded-Proto
or whatever is set in settings.py
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
See https://docs.djangoproject.com/en/1.7/ref/settings/ for details.
I added all the headers since there might be something weird going on if you set them on the location and the server at the same time, they might be all required.
Thank you very much,
Falk
According to the Nginx puppet module we need to expose to
ssl
ssl_cert
ssl_key
to the django module in order to install ssl for API authentication.
Thx, Falk
I am using puppet 3.6 and librarian-puppet 0.4 (which has some name spacing changes). Let me know if it works for you after pulling gif-machines and updating librarian puppet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.