woodpecker/server/template/files/script.html

10 lines
243 B
HTML

<script>
window.ENV = {};
window.ENV.server = window.location.protocol+"//"+window.location.host;
{{ if .csrf }}window.ENV.csrf = "{{ .csrf }}"{{ end }}
{{ if .user }}
window.USER = {{ json .user }};
{{ end }}
</script>