-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sparshith Nairbalige Rai
committed
Oct 11, 2018
1 parent
5f02ea7
commit 15a1b8c
Showing
1 changed file
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
'use strict'; | ||
|
||
const cleanBaseUrl = require('clean-base-url'); | ||
const deprecate = require('./deprecate'); | ||
|
||
module.exports = function isLiveReloadRequest(url, liveReloadPrefix) { | ||
return url === `${cleanBaseUrl(liveReloadPrefix)}livereload`; | ||
let regex = /\/livereload$/gi; | ||
if (url === `${cleanBaseUrl(liveReloadPrefix)}livereload`) { | ||
return true; | ||
} else if (regex.test(url)) { | ||
//version needs to be updated according to the this PR (https://github.com/ember-cli/ember-cli-inject-live-reload/pull/55) | ||
//in master of ember-cli-inject-live-reload. | ||
deprecate(`Upgrade ember-cli-inject-live-reload version to 1.10.0 or above`, true); | ||
return true; | ||
} | ||
return false; | ||
}; |