Skip to content

Commit 603fa6c

Browse files
committed
update hostnames
1 parent 59db691 commit 603fa6c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

docs/manual/5. Imports and NPM.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ This is a great way to create reusable components that you can use across notebo
99

1010
`import * as myNotebook from "!@username/notebook";`
1111

12-
See this example, where we import a message from an external notebook [`@yousef/demo-message`](https://notebooks.typecell.org/@yousef/demo-message).
13-
12+
See this example, where we import a message from an external notebook [`@yousef/demo-message`](https://www.typecell.org/@yousef/demo-message).
1413

1514
```typescript
1615
import * as myNotebook from "!@yousef/demo-message";
1716

1817
export default myNotebook.message;
19-
2018
```
2119

2220
**TypeCell Notebooks are designed to be as "live" as possible**: when you change the code of your imported notebook,
@@ -30,7 +28,6 @@ In TypeCell Notebooks, you can also use any library from [NPM](https://www.npmjs
3028

3129
Let's use the [canvas-confetti](https://www.npmjs.com/package/canvas-confetti) library to make it rain confetti!
3230

33-
3431
```typescript
3532
import { create } from "canvas-confetti";
3633

@@ -42,7 +39,6 @@ const myConfetti = create(canvas);
4239

4340
// Drop some confetty every 500ms
4441
setInterval(() => myConfetti({ particleCount: 70, origin: { y: 0 } }), 500);
45-
4642
```
4743

4844
### Compatibility

packages/editor/src/config/security.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export function validateHostDomain() {
2727
if (ENVIRONMENT === "STAGING") {
2828
return hostname.match(/^typecell-next-[A-z0-9-]+-yousefed.vercel.app$/);
2929
}
30-
return hostname === "notebooks.typecell.org";
30+
return (
31+
hostname === "notebooks.typecell.org" || hostname === "www.typecell.org"
32+
);
3133
}
3234

3335
export function validateFrameDomain() {
@@ -65,5 +67,5 @@ export function getMainDomainFromIframe() {
6567
if (ENVIRONMENT === "STAGING") {
6668
return window.location.hostname;
6769
}
68-
return "notebooks.typecell.org";
70+
return "www.typecell.org";
6971
}

0 commit comments

Comments
 (0)