Specify cache when making request
This was overlooked and is very important in order to leverage the bare server's cache and not break websites
This commit is contained in:
parent
afc0b7845d
commit
1f594a5053
1 changed files with 2 additions and 0 deletions
|
|
@ -129,6 +129,7 @@ class UVServiceWorker extends Ultraviolet.EventEmitter {
|
|||
location.origin !== requestCtx.address.origin
|
||||
? 'cors'
|
||||
: requestCtx.mode,
|
||||
cache: requestCtx.cache,
|
||||
redirect: requestCtx.redirect,
|
||||
}
|
||||
);
|
||||
|
|
@ -303,6 +304,7 @@ class RequestContext {
|
|||
this.method = request.method;
|
||||
this.address = worker.address;
|
||||
this.body = body || null;
|
||||
this.cache = request.cache;
|
||||
this.redirect = request.redirect;
|
||||
this.credentials = 'omit';
|
||||
this.mode = request.mode === 'cors' ? request.mode : 'same-origin';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue