Skip to content

Commit

Permalink
fix: image cors
Browse files Browse the repository at this point in the history
  • Loading branch information
yixiaojiu committed Apr 17, 2024
1 parent f356d83 commit 0755993
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/extra/image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const images = document.querySelectorAll('img');

for (const image of images) {
image.setAttribute('referrerpolicy', 'no-referrer');
}
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@ nav:
- 28-Node.js底层原理(架构篇): chapter28-Node.js底层原理(架构篇).md
- 29-Node.js底层原理(实现篇): chapter29-Node.js底层原理(实现篇).md

extra_javascript:
- path: extra/image.js
defer: true

0 comments on commit 0755993

Please sign in to comment.