Skip to content

Commit 2d3a32c

Browse files
committed
working implementation
1 parent c8b13db commit 2d3a32c

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM nginx:alpine-slim
22
RUN rm -rf /usr/share/nginx/html/*
3-
COPY src/ /usr/share/nginx/html/
3+
COPY src/html/index.html /usr/share/nginx/html/
4+
COPY src/config/default.conf /etc/nginx/conf.d/
45
EXPOSE 80

src/config/default.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
server {
2+
listen 80;
3+
listen [::]:80;
4+
server_name localhost;
5+
6+
location / {
7+
root /usr/share/nginx/html;
8+
try_files /index.html =503;
9+
}
10+
}

src/index.html renamed to src/html/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ <h3>
2121
</center>
2222

2323
<script>
24-
document.getElementById("link").href = "refresher://" + window.location.pathname + window.location.search;
25-
window.location.href = "refresher://" + window.location.pathname + window.location.search;
24+
const link = "refresher://" + window.location.pathname.substr(1) + window.location.search;
25+
document.getElementById("link").href = link;
26+
window.location.href = link;
2627
</script>
2728
</body>
2829
</html>

0 commit comments

Comments
 (0)