mirror of
https://github.com/fmhy/edit.git
synced 2026-01-11 19:06:17 +00:00
added script to redirect to main site if embedded
This commit is contained in:
@@ -63,6 +63,18 @@ export default defineConfig({
|
||||
name: 'google-site-verification',
|
||||
content: 'XCq-ZTw6VJPQ7gVNEOl8u0JRqfadK7WcsJ0H598Wv9E'
|
||||
}
|
||||
],
|
||||
// Redirect to main site if embedded in iframe
|
||||
[
|
||||
'script',
|
||||
{},
|
||||
`
|
||||
(function() {
|
||||
if (window.self !== window.top) {
|
||||
window.top.location = window.location.href;
|
||||
}
|
||||
})();
|
||||
`
|
||||
]
|
||||
],
|
||||
transformHead: async (context) => generateMeta(context, meta.hostname),
|
||||
|
||||
Reference in New Issue
Block a user