From d46ba950e7b713d06b3abea0c153f0bae840e62a Mon Sep 17 00:00:00 2001 From: Thomas Amland Date: Sun, 26 Jul 2020 16:12:31 +0200 Subject: [PATCH] make demo site work out of the box --- README.md | 7 +++---- public/_redirects | 3 ++- src/auth/service.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bc9106e..ef8e4fc 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,9 @@ Modern responsive web frontend for [Airsonic](https://github.com/airsonic/airson https://airsonic.netlify.com -Use address/credentials for your own Airsonic server, or use the subsonic.org demo server: -- server: http://demo.subsonic.org -- username: guest1 -- password guest +Password is `guest`. + +You can use the URL and credentials for your own server if you prefer. **Note**: if your server is using http only you must allow mixed content in your browser otherwise login will not work. ## Build diff --git a/public/_redirects b/public/_redirects index 50a4633..1b5aa9a 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1 +1,2 @@ -/* /index.html 200 \ No newline at end of file +/api/* http://demo.subsonic.org/:splat 200 +/* /index.html 200 diff --git a/src/auth/service.ts b/src/auth/service.ts index a3e45ad..56c08b8 100644 --- a/src/auth/service.ts +++ b/src/auth/service.ts @@ -8,8 +8,8 @@ export class AuthService { private authenticated: boolean = false; constructor() { - this.server = localStorage.getItem("server") || ""; - this.username = localStorage.getItem("username") || ""; + this.server = localStorage.getItem("server") || "/api"; + this.username = localStorage.getItem("username") || "guest1"; this.password = localStorage.getItem("password") || ""; }