Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CDN domains for asset prefixes #2541

Merged
merged 5 commits into from
Nov 16, 2021
Merged

Use CDN domains for asset prefixes #2541

merged 5 commits into from
Nov 16, 2021

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Nov 15, 2021

  • use www.zooniverse.org and frontend.preview.zooniverse.org for asset prefixes in production and staging, respectively.
  • move project images to www.zooniverse.org/projects/assets/ so that we can route image URLs to the NextJS app.
  • Add robots.txt to ban bots from fe-project.zooniverse.org and fe-content-pages.zooniverse.org

Package:
app-content-pages
app-project

Closes #715
Closes #2518

Depends on the nginx config being updated first, to route the asset prefix URLs to the NextJS apps.
zooniverse/static#253

Review Checklist

General

  • Are the tests passing locally and on Travis?
  • Is the documentation up to date?

Components

Apps

  • Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
  • Does it work on mobile?
  • Can you yarn panic && yarn bootstrap or docker-compose up --build and app works as expected?

Publishing

  • Is the changelog updated?
  • Are the dependencies updated for apps and libraries that are using the newly published library?

Post-merging

Disallow all agents from fe-project.zooniverse.org and fe-content-pages.zooniverse.org.
@eatyourgreens eatyourgreens marked this pull request as ready for review November 15, 2021 13:59
@eatyourgreens eatyourgreens requested review from a team and camallen November 15, 2021 14:00
@eatyourgreens eatyourgreens added the ops Changes that affect how something is built or deployed label Nov 15, 2021
Copy link
Contributor

@camallen camallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - is the prod CDN all setup to handle this change?

@github-actions github-actions bot added the approved This PR is approved for merging label Nov 16, 2021
@eatyourgreens
Copy link
Contributor Author

zooniverse/static#253 set up the URLs that are used here, but we need to test this out on staging before changing the production FrontDoor setup. First step, after this PR merges, should be to remove the rule for frontend.preview.zooniverse.org/projects/* in FrontDoor and check that the nginx rules work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved for merging ops Changes that affect how something is built or deployed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NextJS: static assets should use the CDN Set up robots.txt for the staging site
2 participants