mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +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:
@ -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();
|
||||
});
|
Reference in New Issue
Block a user