From 40eadf537f867c81afc072acb2d06ca7b5a945e7 Mon Sep 17 00:00:00 2001 From: Nathan Levesque Date: Mon, 12 Aug 2024 12:01:53 -0400 Subject: [PATCH] Update values of hostnames to use learn.mit.edu (#1401) --- .github/workflows/production.yml | 2 +- .github/workflows/release-candidate.yml | 2 +- README.md | 2 +- e2e_testing/.env | 4 ++-- e2e_testing/README.md | 2 +- e2e_testing/package.json | 4 ++-- frontends/api/jest.config.ts | 2 +- frontends/mit-open/jest.config.ts | 2 +- frontends/ol-ckeditor/jest.config.ts | 2 +- .../ol-components/src/components/Banner/Banner.stories.tsx | 4 ++-- frontends/ol-utilities/jest.config.ts | 2 +- package.json | 4 ++-- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 95757713cc..d6931cafda 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -46,7 +46,7 @@ jobs: SENTRY_DSN: ${{ secrets.SENTRY_DSN_PROD }} SENTRY_ENV: ${{ secrets.MITOPEN_ENV_PROD }} MITOPEN_AXIOS_WITH_CREDENTIALS: true - MITOPEN_API_BASE_URL: https://api.mitopen.odl.mit.edu + MITOPEN_API_BASE_URL: https://api.learn.mit.edu MITOPEN_SUPPORT_EMAIL: mitlearn-support@mit.edu - uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520 diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index a0174d21b0..a731eb573c 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -46,7 +46,7 @@ jobs: SENTRY_DSN: ${{ secrets.SENTRY_DSN_RC }} SENTRY_ENV: ${{ secrets.MITOPEN_ENV_RC }} MITOPEN_AXIOS_WITH_CREDENTIALS: true - MITOPEN_API_BASE_URL: https://api.mitopen-rc.odl.mit.edu + MITOPEN_API_BASE_URL: https://api.rc.learn.mit.edu MITOPEN_SUPPORT_EMAIL: mitlearn-support@mit.edu - uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520 diff --git a/README.md b/README.md index dcca76c8b5..836160a041 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ Once these are set (and you've restarted the app), you should see events flowing A Javascript bundle of exported frontend components can be generated for use in external websites that have CORS allowance into a given instance of `mit-open`. There are a few settings you might want to change in order to get the expected results. - `MITOPEN_AXIOS_WITH_CREDENTIALS` - This sets `withCredentials: true` when initializing the Axios API, which tells the end user's browser to send along any browser level cookies for the current domain when making CORS requests -- `MITOPEN_API_BASE_URL` - This sets the base url used for API requests, which will need to be set to a fully qualified url pointing to an instance of `mit-open` (i.e. https://mitopen.odl.mit.edu) in order for requests from the external site to reach the proper destination +- `MITOPEN_API_BASE_URL` - This sets the base url used for API requests, which will need to be set to a fully qualified url pointing to an instance of `mit-open` (i.e. https://learn.mit.edu) in order for requests from the external site to reach the proper destination - `CORS_ALLOWED_ORIGINS`, `CSRF_TRUSTED_ORIGINS` - On the instance of `mit-open` that the externally hosted components will access via the API, the domains of any sites that need CORS access need to be here as a list of strings To build the bundle of exported components, run: diff --git a/e2e_testing/.env b/e2e_testing/.env index c703fbb6d1..f85fcfe57a 100644 --- a/e2e_testing/.env +++ b/e2e_testing/.env @@ -1,4 +1,4 @@ BASE_URL=http://localhost:8063/ # BASE_URL=http://nginx:8063/ -# BASE_URL=https://mit-open-rc.odl.mit.edu/ -# BASE_URL=https://mitopen.odl.mit.edu/ +# BASE_URL=https://rc.learn.mit.edu/ +# BASE_URL=https://learn.mit.edu/ diff --git a/e2e_testing/README.md b/e2e_testing/README.md index b021a09571..d21de31ca5 100644 --- a/e2e_testing/README.md +++ b/e2e_testing/README.md @@ -33,7 +33,7 @@ yarn test To target specific environments, set `BASE_URL` on the environment, e.g: ```bash -BASE_URL=https://mitopen.odl.mit.edu/ yarn test +BASE_URL=https://learn.mit.edu/ yarn test ``` NPM scripts are provided for our RC and Production environments: diff --git a/e2e_testing/package.json b/e2e_testing/package.json index b4b5ef9c55..39b945cd61 100644 --- a/e2e_testing/package.json +++ b/e2e_testing/package.json @@ -3,8 +3,8 @@ "scripts": { "start": "playwright test --ui", "test": "playwright test", - "test:rc": "BASE_URL=https://mit-open-rc.odl.mit.edu/ playwright test --grep @sanity", - "test:production": "BASE_URL=https://mitopen.odl.mit.edu/ playwright test --grep @sanity" + "test:rc": "BASE_URL=https://rc.learn.mit.edu/ playwright test --grep @sanity", + "test:production": "BASE_URL=https://learn.mit.edu/ playwright test --grep @sanity" }, "devDependencies": { "@playwright/test": "^1.42.1", diff --git a/frontends/api/jest.config.ts b/frontends/api/jest.config.ts index 6fd5ec7cba..fa929ee93d 100644 --- a/frontends/api/jest.config.ts +++ b/frontends/api/jest.config.ts @@ -10,7 +10,7 @@ const config: Config.InitialOptions = { globals: { APP_SETTINGS: { MITOPEN_AXIOS_WITH_CREDENTIALS: false, - MITOPEN_API_BASE_URL: "https://api.mitopen-test.odl.mit.edu", + MITOPEN_API_BASE_URL: "https://api.test.learn.mit.edu", }, }, } diff --git a/frontends/mit-open/jest.config.ts b/frontends/mit-open/jest.config.ts index d85982912e..3ed821699f 100644 --- a/frontends/mit-open/jest.config.ts +++ b/frontends/mit-open/jest.config.ts @@ -16,7 +16,7 @@ const config: Config.InitialOptions = { globals: { APP_SETTINGS: { EMBEDLY_KEY: "embedly_key", - MITOPEN_API_BASE_URL: "https://api.mitopen-test.odl.mit.edu", + MITOPEN_API_BASE_URL: "https://api.test.learn.mit.edu", PUBLIC_URL: "", SITE_NAME: "MIT Open", }, diff --git a/frontends/ol-ckeditor/jest.config.ts b/frontends/ol-ckeditor/jest.config.ts index 43cac65181..24c6c19d0f 100644 --- a/frontends/ol-ckeditor/jest.config.ts +++ b/frontends/ol-ckeditor/jest.config.ts @@ -16,7 +16,7 @@ const config: Config.InitialOptions = { CKEDITOR_UPLOAD_URL: "https://meowmeow.com", EMBEDLY_KEY: "embedly_key", MITOPEN_AXIOS_WITH_CREDENTIALS: false, - MITOPEN_API_BASE_URL: "https://api.mitopen-test.odl.mit.edu", + MITOPEN_API_BASE_URL: "https://api.test.learn.mit.edu", }, }, } diff --git a/frontends/ol-components/src/components/Banner/Banner.stories.tsx b/frontends/ol-components/src/components/Banner/Banner.stories.tsx index 59e2922190..77521fdd20 100644 --- a/frontends/ol-components/src/components/Banner/Banner.stories.tsx +++ b/frontends/ol-components/src/components/Banner/Banner.stories.tsx @@ -48,7 +48,7 @@ export const logoBanner: Story = { @@ -66,7 +66,7 @@ export const logoBannerWithExtras: Story = { diff --git a/frontends/ol-utilities/jest.config.ts b/frontends/ol-utilities/jest.config.ts index ecc5e2e722..bb7d644b4c 100644 --- a/frontends/ol-utilities/jest.config.ts +++ b/frontends/ol-utilities/jest.config.ts @@ -5,7 +5,7 @@ const config: Config.InitialOptions = { ...baseConfig, globals: { APP_SETTINGS: { - MITOPEN_API_BASE_URL: "https://api.mitopen-test.odl.mit.edu", + MITOPEN_API_BASE_URL: "https://api.test.learn.mit.edu", }, }, } diff --git a/package.json b/package.json index ba311b4f82..4a69c30e36 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "build": "yarn workspace mit-open run build", "watch": "yarn workspace mit-open run watch", "style-lint": "yarn workspace frontends run style-lint", - "test": "MITOPEN_API_BASE_URL=https://api.mitopen-test.odl.mit.edu yarn workspace frontends global:test", - "test-watch": "MITOPEN_API_BASE_URL=https://api.mitopen-test.odl.mit.edu yarn workspace frontends test-watch", + "test": "MITOPEN_API_BASE_URL=https://api.test.learn.mit.edu yarn workspace frontends global:test", + "test-watch": "MITOPEN_API_BASE_URL=https://api.test.learn.mit.edu yarn workspace frontends test-watch", "storybook": "yarn workspace frontends storybook", "lint-check": "yarn workspace frontends run lint-check", "typecheck": "yarn workspace frontends run typecheck"