mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-783: Merge ensure GET requests to REST API are not cached in IE.
This commit is contained in:
@@ -18,14 +18,19 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* The config block for setting up the HTTP PATCH method.
|
||||
* Defaults for the AngularJS $http service.
|
||||
*/
|
||||
angular.module('index').config(['$httpProvider',
|
||||
function indexHttpPatchConfig($httpProvider) {
|
||||
angular.module('index').config(['$httpProvider', function httpDefaults($httpProvider) {
|
||||
|
||||
// Do not cache the responses of GET requests
|
||||
$httpProvider.defaults.headers.get = {
|
||||
'Cache-Control' : 'no-cache',
|
||||
'Pragma' : 'no-cache'
|
||||
};
|
||||
|
||||
// Use "application/json" content type by default for PATCH requests
|
||||
$httpProvider.defaults.headers.patch = {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
'Content-Type' : 'application/json'
|
||||
};
|
||||
|
||||
}]);
|
||||
|
||||
|
Reference in New Issue
Block a user