NUDelta / dtr-web

Northwestern's Design, Technology, and Research (DTR) Program Website
http://dtr.northwestern.edu/
1 stars 0 forks source link

airtable image urls expire after 2 hours #69

Open kapil1garg opened 1 year ago

kapil1garg commented 1 year ago

For security reasons, airtable has changed how their URLs are generated for attachments which we use for storing all images. The object structure looks the same, but the domain is different:

image

There are 2 issues to fix:

  1. In deployment, this seems to be failing since next.config.js is using dl.airtable.com instead of v5.airtableusercontent.com.
  2. URLs are no longer guaranteed to persist after 2 hours, so no pages can use SSG and refer to images hosted on Airtable. Pages using ISR should be ok since the change in URL will invalidate the next page cache and cause the page to re-generate with the new image URL. SSR is ideal here since the server will fetch the new URL on each page load (related to #59)