Last active
September 5, 2019 04:49
-
-
Save daimon99/77a7437abd16f3b023885955cd4950d9 to your computer and use it in GitHub Desktop.
django首页重定向
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
location = / { | |
try_files /index.html @django; | |
} | |
location @django { | |
proxy_pass http://127.0.0.1:9076; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
add_header Cache-Control no-store; | |
} |
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
path('', lambda request: redirect('admin:essaygo_article_add', permanent=False)), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment