Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit b0f7c48

Browse files
committed
Merge branch 'develop', prepare 3.2.0
2 parents c76c600 + bb95725 commit b0f7c48

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/docker/start.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ exports.start = async ({image, username, resultStream, existing = []}) => {
250250
Labels['traefik.frontend.rateLimit.rateSet.exo.burst'] = String(config.rateLimit.burst);
251251
}
252252

253+
// if basic auth is set - add it to config
254+
if (config.basicAuth && config.basicAuth.length) {
255+
Labels['traefik.frontend.auth.basic.users'] = config.basicAuth
256+
}
257+
253258
// if running in swarm mode - run traefik as swarm service
254259
if (serverConfig.swarm) {
255260
// create service config

test/deploy.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ test('Should deploy simple HTML project', async done => {
189189
expect(container.Labels['traefik.frontend.rateLimit.rateSet.exo.average']).toEqual('1');
190190
expect(container.Labels['traefik.frontend.rateLimit.rateSet.exo.burst']).toEqual('5');
191191
expect(container.Labels['traefik.frontend.rule']).toBeUndefined();
192+
expect(container.Labels['traefik.frontend.auth.basic.users']).toEqual('user:$apr1$$9Cv/OMGj$$ZomWQzuQbL.3TRCS81A1g/');
192193
expect(container.NetworkSettings.Networks.exoframe).toBeDefined();
193194

194195
// store initial deploy id

test/fixtures/html-project/exoframe.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"period": "1s",
88
"average": 1,
99
"burst": 5
10-
}
10+
},
11+
"basicAuth": "user:$apr1$$9Cv/OMGj$$ZomWQzuQbL.3TRCS81A1g/"
1112
}

0 commit comments

Comments
 (0)