Skip to content

Commit

Permalink
Let hostname full match have higher priority
Browse files Browse the repository at this point in the history
  • Loading branch information
layerssss committed Feb 19, 2019
1 parent 0b3803b commit dbed96c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/localhostd.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ class LocalhostD {
}

findApplication(hostname) {
const application = this._state.applications.find(
a =>
hostname === this._getApplicationHostname(a) ||
const application =
this._state.applications.find(
a => hostname === this._getApplicationHostname(a)
) ||
this._state.applications.find(a =>
_.endsWith(hostname, `.${this._getApplicationHostname(a)}`)
);
);

if (!application) return null;

Expand Down

0 comments on commit dbed96c

Please sign in to comment.