Skip to content

Commit

Permalink
Merge branch 'wg-easy:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartegnian committed Mar 24, 2024
2 parents 92b68ca + f134a36 commit 65a826b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ COPY --from=build_node_modules /node_modules /node_modules
RUN \
# Enable this to run `npm run serve`
npm i -g nodemon &&\
# Workaround CVE-2023-42282
npm uninstall -g ip &&\
# Delete unnecessary files
npm cache clean --force && rm -rf ~/.npm

Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ docker pull dartegnian/wg-easy-m3

And then run the `docker run -d \ ...` command above again.

To update using Docker Compose:

```shell
docker compose pull
docker compose up --detach
```

With Docker Compose WireGuard Easy can be updated with a single command:
`docker compose up --detach --pull always` (if an image tag is specified in the
Compose file and it is not `latest`, make sure that it is changed to the desired
one; by default it is omitted and
[defaults to `latest`](https://docs.docker.com/engine/reference/run/#image-references)). \
The WireGuared Easy container will be automatically recreated if a newer image
was pulled.

Expand Down
6 changes: 6 additions & 0 deletions src/lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ module.exports = class Server {
return;
}

if (id.endsWith('.html')) setHeader(event, 'Content-Type', 'text/html');
if (id.endsWith('.js')) setHeader(event, 'Content-Type', 'application/javascript');
if (id.endsWith('.json')) setHeader(event, 'Content-Type', 'application/json');
if (id.endsWith('.css')) setHeader(event, 'Content-Type', 'text/css');
if (id.endsWith('.png')) setHeader(event, 'Content-Type', 'image/png');

return {
size: stats.size,
mtime: stats.mtimeMs,
Expand Down
48 changes: 26 additions & 22 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 65a826b

Please sign in to comment.