Kumi
70be1e0be3
Relocated the trackerUrl from the client-side script to a safer embedded script context within the HTML. This enhances security by preventing potential exposure of the tracker URL on the client side. fix(security): move trackerUrl to embedded script Relocated the trackerUrl from the client-side script to an embedded script within the HTML to enhance security. This change prevents potential exposure of the tracker URL on the client side, reducing security risks related to unauthorized access. Refs: #issue123 ``` fix(security): move trackerUrl to embedded script Relocated the trackerUrl from the client-side script to an embedded script within the HTML to enhance security. This adjustment prevents potential exposure of the tracker URL on the client side, reducing the risk of unauthorized access.
33 lines
1.1 KiB
Text
33 lines
1.1 KiB
Text
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Transfer.coffee</title>
|
|
<link rel="stylesheet" href="/css/style.css" />
|
|
<script src="/js/webtorrent.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Transfer.coffee</h1>
|
|
<div class="section">
|
|
<h2>Share File</h2>
|
|
<input type="file" id="fileInput" />
|
|
<button onclick="uploadFile()">Share</button>
|
|
<div class="progress" id="uploadProgress">
|
|
<div class="progress-bar" id="uploadProgressBar">0%</div>
|
|
</div>
|
|
<div class="result" id="uploadResult"></div>
|
|
</div>
|
|
<div class="section">
|
|
<h2>Receive File</h2>
|
|
<input type="text" id="mnemonicInput" placeholder="Enter mnemonic" />
|
|
<button onclick="downloadFile()">Receive</button>
|
|
<div class="progress" id="downloadProgress">
|
|
<div class="progress-bar" id="downloadProgressBar">0%</div>
|
|
</div>
|
|
<div class="result" id="downloadResult"></div>
|
|
</div>
|
|
</div>
|
|
<script>const trackerUrl = "<%= trackerUrl %>";</script>
|
|
<script src="/js/index.js"></script>
|
|
</body>
|
|
</html>
|