Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c410152
commit ba94fec
Showing
11 changed files
with
115 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
Changelog | ||
========= | ||
|
||
0.1.1 | ||
----- | ||
|
||
- Add server to support tls or not | ||
|
||
0.1.0 | ||
----- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.0' | ||
__version__ = '0.1.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
server { | ||
set $api_name -; | ||
access_log /var/log/nginx/api_access.log api.example.com; | ||
|
||
listen 80; | ||
server_name api.example.com; | ||
|
||
|
||
# API definitions, one per file | ||
location /api/warehouse/pricing { | ||
|
||
set $upstream warehouse_pricing; | ||
rewrite ^ /_warehouse last; | ||
} | ||
location = /_warehouse { | ||
internal; | ||
set $api_name "Warehouse"; | ||
proxy_pass http://$upstream$request_uri; | ||
} | ||
|
||
# Error responses | ||
error_page 404 = @400; # Invalid paths are treated as bad requests | ||
proxy_intercept_errors on; # Do not send backend errors to the client | ||
include error_page.conf; # API client friendly JSON error responses | ||
default_type application/json; # If no content-type then assume JSON | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
server { | ||
set $api_name -; | ||
access_log /var/log/nginx/api_access.log api.example.com; | ||
|
||
listen 80; | ||
server_name api.example.com; | ||
|
||
|
||
# API definitions, one per file | ||
include locations_conf.d/*.conf; | ||
|
||
# Error responses | ||
error_page 404 = @400; # Invalid paths are treated as bad requests | ||
proxy_intercept_errors on; # Do not send backend errors to the client | ||
include error_page.conf; # API client friendly JSON error responses | ||
default_type application/json; # If no content-type then assume JSON | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters