Skip to content

Commit

Permalink
Update vanillaJs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengyushiang authored Mar 12, 2024
1 parent e10782b commit 3b54e73
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontend/vanillaJs.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ const applyMask = (mask, canvas, result) => {
```
### Iframe

- Embed apps in iframe should consider SameSite. ([reference](https://medium.com/%E7%A8%8B%E5%BC%8F%E7%8C%BF%E5%90%83%E9%A6%99%E8%95%89/%E5%86%8D%E6%8E%A2%E5%90%8C%E6%BA%90%E6%94%BF%E7%AD%96-%E8%AB%87-samesite-%E8%A8%AD%E5%AE%9A%E5%B0%8D-cookie-%E7%9A%84%E5%BD%B1%E9%9F%BF%E8%88%87%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A0%85-6195d10d4441))

```javascript
// server-side
res.cookie("name", value, {
samSite: "None",
secure: true,
});
```

- Make iframe content bigger

```css
Expand Down Expand Up @@ -460,4 +470,4 @@ const Recorder = (() => {
})();

export default Recorder;
```
```

0 comments on commit 3b54e73

Please sign in to comment.