Skip to content

Commit

Permalink
Update values of hostnames to use learn.mit.edu (#1401)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysyngsun authored Aug 12, 2024
1 parent acd8a19 commit 40eadf5
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]

- uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]

- uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions e2e_testing/.env
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion e2e_testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions e2e_testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontends/api/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion frontends/mit-open/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
2 changes: 1 addition & 1 deletion frontends/ol-ckeditor/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const logoBanner: Story = {
<Banner
avatar={
<img
src="https://mitopen.odl.mit.edu/static/images/mit-logo-transparent5.svg"
src="https://learn.mit.edu/static/images/mit-logo-transparent5.svg"
alt="MIT Logo"
style={{ height: "37px", filter: "saturate(0%) invert(100%)" }}
/>
Expand All @@ -66,7 +66,7 @@ export const logoBannerWithExtras: Story = {
<Banner
avatar={
<img
src="https://mitopen.odl.mit.edu/static/images/mit-logo-transparent5.svg"
src="https://learn.mit.edu/static/images/mit-logo-transparent5.svg"
alt="MIT Logo"
style={{ height: "37px", filter: "saturate(0%) invert(100%)" }}
/>
Expand Down
2 changes: 1 addition & 1 deletion frontends/ol-utilities/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 40eadf5

Please sign in to comment.