Skip to content

Commit

Permalink
test: allow running composer in hosted mode for tests (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-nagpal authored and a-b-r-o-w-n committed Nov 22, 2019
1 parent 4be03bf commit 1904471
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class SelfHostBotConnector implements IBotConnector {
public connect = async (env: BotEnvironments, hostName: string) => {
this.status = BotStatus.Connected;
const prefix = env === 'production' ? '' : 'integration/';
const root = hostName ? `https://${hostName}` : absHostRoot;
const root = hostName && hostName !== `localhost` ? `https://${hostName}` : absHostRoot;

return Promise.resolve(`${root}/api/${prefix}messages`);
};
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/settings/env.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

export const absHosted = !!process.env.PUBLIC_URL;
export const absHosted = process.env.COMPOSER_AUTH_PROVIDER === 'abs-h';
export const absHostRoot = process.env.WEBSITE_HOSTNAME
? `https://${process.env.WEBSITE_HOSTNAME}`
: 'http://localhost:3978';

0 comments on commit 1904471

Please sign in to comment.