From 632aca51533d5ff7dce8fd2028948a6f3bc69d43 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Wed, 9 May 2018 20:38:26 +0200
Subject: [PATCH] Dev setup for working with subsonic API

---
 docker/nginx/conf.dev | 4 ++++
 front/config/index.js | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/docker/nginx/conf.dev b/docker/nginx/conf.dev
index 38c3de6c..ab6714e6 100644
--- a/docker/nginx/conf.dev
+++ b/docker/nginx/conf.dev
@@ -82,5 +82,9 @@ http {
             include /etc/nginx/funkwhale_proxy.conf;
             proxy_pass   http://api:12081/;
         }
+        location /rest/ {
+            include /etc/nginx/funkwhale_proxy.conf;
+            proxy_pass   http://api:12081/api/subsonic/rest/;
+        }
     }
 }
diff --git a/front/config/index.js b/front/config/index.js
index 669ce54f..f4996f02 100644
--- a/front/config/index.js
+++ b/front/config/index.js
@@ -34,7 +34,7 @@ module.exports = {
         changeOrigin: true,
         ws: true,
         filter: function (pathname, req) {
-          let proxified = ['.well-known', 'staticfiles', 'media', 'federation', 'api']
+          let proxified = ['rest', '.well-known', 'staticfiles', 'media', 'federation', 'api']
           let matches = proxified.filter(e => {
             return pathname.match(`^/${e}`)
           })
-- 
GitLab