Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
/ circleci-nginx-proxy Public archive

Sample Python Flask app using Nginx as a proxy-forward to allow outbound requests to be handled inside CircleCI

License

Notifications You must be signed in to change notification settings

bear/circleci-nginx-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A test Python Flask app to show how to have Nginx act as a proxy-forward inside of a CircleCI build.

Requirements and Assumptions

  • Python v2.7
  • Python Flask
  • Nginx

Nginx Config

server {
    listen      80;
    server_name _;

    location / {
        try_files $uri @flask;
    }
    location @flask {
        proxy_pass         http://localhost:5000;
        proxy_redirect     off;
        proxy_set_header   Host "foobar.com";
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host $server_name;
    }
}

Running

make server

About

Sample Python Flask app using Nginx as a proxy-forward to allow outbound requests to be handled inside CircleCI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published