diff --git a/aws/beta.ordbok.uib.no_stack.yaml b/aws/beta.ordbok.uib.no_stack.yaml index 244091adf6b078e09590c2f6ff80e3eb40728fc9..06d64a0a8846ae99bdd8f3b9e15e1a899468752f 100644 --- a/aws/beta.ordbok.uib.no_stack.yaml +++ b/aws/beta.ordbok.uib.no_stack.yaml @@ -112,6 +112,7 @@ Resources: HeaderBehavior: whitelist Headers: - "x-api-key" + - cachebuster Distribution: Type: "AWS::CloudFront::Distribution" Properties: diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 20d9e28c8a1a058167a505d9e1ca8b1d2873b5e4..1243494c70c56d9d0f76875a6aac8c6456c2c785 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -91,7 +91,11 @@ axios.interceptors.request.use(function (config) { }); function navigate_to_article(self, source) { - axios.get(api_endpoint + '/' + self.$route.params.lang + '/article/' + self.$route.params.id) + let config = {headers: {}} + if ((self.$route.query.nocache || '').toLowerCase() == 'true') { + config.headers.cachebuster = Date.now() + } + axios.get(api_endpoint + '/' + self.$route.params.lang + '/article/' + self.$route.params.id, config) .then(function(response){ self.article = Object.assign(response.data, {'dictionary': self.$route.params.lang, source: source, results: self.search_results}) self.search_results = []