refactor(front): Untangle Front- and Backend
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2039>
This commit is contained in:
parent
11b20f90bf
commit
e71003dbe0
|
@ -0,0 +1,2 @@
|
||||||
|
Instead of requesting the right spa content from the API using a middleware we now serve the
|
||||||
|
Frontend directly with nginx and only proxy-forward for API endpoints
|
|
@ -83,16 +83,17 @@ server {
|
||||||
text/x-cross-domain-policy;
|
text/x-cross-domain-policy;
|
||||||
# end of compression settings
|
# end of compression settings
|
||||||
|
|
||||||
location / {
|
location /api/ {
|
||||||
include /etc/nginx/funkwhale_proxy.conf;
|
include /etc/nginx/funkwhale_proxy.conf;
|
||||||
# This is needed if you have file import via upload enabled.
|
# This is needed if you have file import via upload enabled.
|
||||||
client_max_body_size ${NGINX_MAX_BODY_SIZE};
|
client_max_body_size ${NGINX_MAX_BODY_SIZE};
|
||||||
proxy_pass http://funkwhale-api/;
|
proxy_pass http://funkwhale-api/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /front/ {
|
location / {
|
||||||
alias ${FUNKWHALE_FRONTEND_PATH}/;
|
alias ${FUNKWHALE_FRONTEND_PATH}/;
|
||||||
expires 1d;
|
expires 1d;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /front/embed.html {
|
location = /front/embed.html {
|
||||||
|
|
Loading…
Reference in New Issue