diff --git a/docs/subpath.md b/docs/subpath.md index 978afdcfd85..554d2db47df 100644 --- a/docs/subpath.md +++ b/docs/subpath.md @@ -33,7 +33,7 @@ server { ``` This will tell the application to serve the application and relevant elements under -`/some/deep/map`. +`/hassio/ingress/`. In case you are using the [ingress of Home Assistant](https://www.home-assistant.io/blog/2019/04/15/hassio-ingress/) you will want to pick up the `X-Ingress-Path;` and map it, something along diff --git a/test/lib/renderIndex.test.js b/test/lib/renderIndex.test.js index 7f236454924..fe13aef8cbd 100644 --- a/test/lib/renderIndex.test.js +++ b/test/lib/renderIndex.test.js @@ -23,12 +23,19 @@ const mockResponse = { describe('#renderIndex', () => { describe('Processing configuration', () => { let renderIndex + let mockedReaddir beforeEach(() => { renderIndex = rewire('../../lib/renderIndex') renderIndex.__set__('webConfig', { base: '/configured/path' }) + mockedReaddir = sinon.stub(fs, 'readdirSync') + mockedReaddir.returns([]) + }) + + afterEach(() => { + mockedReaddir.restore() }) it('uses the base from the `X-External-Path` header', () => {