1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

Implements Content-Security-Policy (#442)

This commit is contained in:
Amir Raminfar
2020-05-08 19:45:08 -07:00
committed by GitHub
parent b04e950358
commit 99f7e0d980
14 changed files with 73 additions and 49 deletions

View File

@@ -8,6 +8,7 @@
<script>
import debounce from "lodash.debounce";
import InfiniteLoader from "./InfiniteLoader";
import config from "../store/config";
export default {
props: ["id"],
@@ -33,7 +34,7 @@ export default {
this.buffer = [];
this.es = null;
}
this.es = new EventSource(`${BASE_PATH}/api/logs/stream?id=${this.id}`);
this.es = new EventSource(`${config.base}/api/logs/stream?id=${this.id}`);
const flushBuffer = debounce(
() => {
this.messages.push(...this.buffer);