Created
November 28, 2018 10:07
-
-
Save vividvilla/deec57750ed993c6db04668ee1c2f72f to your computer and use it in GitHub Desktop.
Nginx POST and GET request serve static 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
server { | |
listen 9999; | |
# This is the key. | |
error_page 405 =200 $uri; | |
location /test { | |
add_header 'Content-Type' 'application/json' always; | |
alias /Users/me/abc.json; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment