Skip to content

Commit

Permalink
update setting document.domain for new GCP domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing Wang committed Mar 5, 2024
1 parent 5f65351 commit 97eff9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/codemirror/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<head>
<script>
try {
document.domain = "banno.com";
const hostParts = window.location.hostname.split('.');
document.domain = hostParts.slice(hostParts.length - 2, hostParts.length).join('.');
} catch (error) {
console.warn('`document.domain` could not be set. The content editor will not work (because of cross domain issues), but the rest of the application should not be affected.');
}
Expand Down

0 comments on commit 97eff9e

Please sign in to comment.