File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
terraform/modules/frontend Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -256,20 +256,25 @@ async function handler(event) {
256256 }
257257 }
258258 }
259+ let statusCode = 307;
260+ let statusDescription = 'Not Found';
259261 let redirectUrl = "https://acm.illinois.edu/404";
260262 try {
261263 const value = await kvs.get(path);
262264 if (value) {
263265 redirectUrl = value;
266+ statusCode = 302;
267+ statusDescription = 'Found'
264268 }
265269 } catch (err) {
266270 console.log(`KVS key lookup failed for $!{path}: $!{err}`);
267271 }
268272 var response = {
269- statusCode: 302 ,
270- statusDescription: 'Found' ,
273+ statusCode: statusCode ,
274+ statusDescription: statusDescription ,
271275 headers: {
272276 'location': { value: redirectUrl }
277+ 'cache-control': { value: 'no-cache, no-store, must-revalidate' }
273278 }
274279 };
275280 return response;
You can’t perform that action at this time.
0 commit comments