How to create expires header

I want to set 7 days expires header in my workers site.
How to create expires header using headers.append()?

let headers = new Headers();
headers.append(‘Expires’, new Date(Date.now() + 604800000).toUTCString());

There is this example of altering headers
While your method works it would be better is to create a response object and then edit the headers of that response.