diff --git a/package.json b/package.json index 89d3f82..13d30ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unleash-proxy-client", - "version": "3.3.0-beta.1", + "version": "3.3.0-alpha.3", "description": "A browser client that can be used together with the unleash-proxy.", "type": "module", "main": "./build/index.cjs", diff --git a/src/index.ts b/src/index.ts index 5d71548..c241af8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -379,8 +379,8 @@ export class UnleashClient extends TinyEmitter { const headers = { [this.headerName]: this.clientKey, Accept: 'application/json', - 'Content-Type': 'application/json', 'If-None-Match': this.etag, + 'Content-Type': 'application/json', }; Object.entries(this.customHeaders) .filter(notNullOrUndefined) @@ -418,9 +418,9 @@ export class UnleashClient extends TinyEmitter { const response = await this.fetch(url.toString(), { method, - cache: 'no-cache', headers: this.getHeaders(), body, + referrer: 'origin', signal, }); if (this.sdkState === 'error' && response.status < 400) { diff --git a/src/metrics.ts b/src/metrics.ts index 7ef67d2..205c831 100644 --- a/src/metrics.ts +++ b/src/metrics.ts @@ -135,7 +135,6 @@ export default class Metrics { try { await this.fetch(url, { - cache: 'no-cache', method: 'POST', headers: this.getHeaders(), body: JSON.stringify(payload),