[+] Better deploy guide
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# The MeowIndex web app block
|
||||
location /__meowindex__ {
|
||||
alias /etc/nginx/MeowIndex/dist;
|
||||
|
||||
# Use sub_filter to configure the app
|
||||
sub_filter_types application/javascript;
|
||||
sub_filter_once off;
|
||||
sub_filter "{DEPLOY-PATH-PLACEHOLDER}" "/__meowindex__";
|
||||
sub_filter "{HOST-PLACEHOLDER}" "/api";
|
||||
sub_filter "\"/assets" "\"/__meowindex__/assets";
|
||||
|
||||
# Serve index.html on other 404 paths as well
|
||||
try_files $uri /__meowindex__/index.html;
|
||||
}
|
||||
|
||||
# The api block
|
||||
location /api {
|
||||
rewrite ^/api(/.*)$ $1 break;
|
||||
index DISABLE_INDEX_HTML_AUTO_MATCHING;
|
||||
|
||||
autoindex on;
|
||||
autoindex_format json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
Reference in New Issue
Block a user