mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-04-01 00:35:30 +02: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'
|
'$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider', '$sceDelegateProvider'
|
||||||
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) ->
|
(location, state, $dialogProvider, analytics, $httpProvider, $sceDelegateProvider) ->
|
||||||
|
|
||||||
$httpProvider.interceptors.push [
|
if window.pfm.environment == 'local'
|
||||||
->
|
$httpProvider.interceptors.push [
|
||||||
request: (config) ->
|
->
|
||||||
return config if !(/^\/?templates\//.test config.url)
|
request: (config) ->
|
||||||
config.url += '?' + Math.ceil(Math.random() * 1000000)
|
return config if !(/^\/?templates\//.test config.url)
|
||||||
return config
|
config.url += '?' + Math.ceil(Math.random() * 1000000)
|
||||||
]
|
return config
|
||||||
|
]
|
||||||
|
|
||||||
# This fixes resource loading on IE
|
# This fixes resource loading on IE
|
||||||
$sceDelegateProvider.resourceUrlWhitelist [
|
$sceDelegateProvider.resourceUrlWhitelist [
|
||||||
|
|
Loading…
Add table
Reference in a new issue