mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:22:45 +08:00
REFACTOR: Use a <script src>
tag to start the app (#12401)
This is to help with potential CSP issues.
This commit is contained in:
parent
dc3af285b2
commit
1c82ed9f3e
|
@ -27,18 +27,10 @@
|
|||
<div id='offscreen-content'>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener("discourse-booted", (e) => {
|
||||
const config = e.detail;
|
||||
const app = require(`${config.modulePrefix}/app`)["default"].create(
|
||||
config
|
||||
);
|
||||
app.start();
|
||||
});
|
||||
</script>
|
||||
{{bootstrap-content-for "hidden-login-form"}}
|
||||
{{bootstrap-content-for "preloaded"}}
|
||||
|
||||
<script src="{{rootURL}}assets/scripts/start-app.js"></script>
|
||||
<script src="{{rootURL}}assets/scripts/discourse-boot.js"></script>
|
||||
|
||||
{{bootstrap-content-for "body-footer"}}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
document.addEventListener("discourse-booted", (e) => {
|
||||
const config = e.detail;
|
||||
const app = require(`${config.modulePrefix}/app`)["default"].create(config);
|
||||
app.start();
|
||||
});
|
Loading…
Reference in New Issue
Block a user