mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Ensure template cachebuster interceptor is only pushed on local environments
This commit is contained in:
parent
f01fcae3af
commit
f09d75cf76
1 changed files with 8 additions and 7 deletions
|
@ -29,13 +29,14 @@ module.config [
|
|||
'$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider'
|
||||
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) ->
|
||||
|
||||
$httpProvider.interceptors.push [
|
||||
->
|
||||
request: (config) ->
|
||||
return config if !(/^\/?templates\//.test config.url)
|
||||
config.url += '?' + Math.ceil(Math.random() * 1000000)
|
||||
return config
|
||||
]
|
||||
if window.pfm.environment == 'local'
|
||||
$httpProvider.interceptors.push [
|
||||
->
|
||||
request: (config) ->
|
||||
return config if !(/^\/?templates\//.test config.url)
|
||||
config.url += '?' + Math.ceil(Math.random() * 1000000)
|
||||
return config
|
||||
]
|
||||
|
||||
# This fixes resource loading on IE
|
||||
$sceDelegateProvider.resourceUrlWhitelist [
|
||||
|
|
Loading…
Reference in a new issue