Compare commits

...

3 Commits

Author SHA1 Message Date
schlagmichdoch
31ec776fb3 Only handle requests with the same origin via the service worker 2025-02-25 18:19:38 +01:00
schlagmichdoch
4862ba3067 Increase version to v1.11.2
## Enhancements
- Speed up update process by skipping waiting and claiming currently open pages -> no need to close all tabs in order to get an update anymore
- Update Bluesky icon from square to butterfly
- Update node dependencies

## Fixes
- Prevent service-worker from responding with redirect (fixes #384)
- Fix: switch off twitter button via env var not possible (#388)
- Add missing files to paths that get cached upon sw installation

## Languages
- Translations updates from Hosted Weblate (Japanese)
2025-02-24 20:46:32 +01:00
schlagmichdoch
7639aca84c Update node dependencies 2025-02-24 20:45:12 +01:00
6 changed files with 26 additions and 19 deletions

View File

@@ -36,7 +36,7 @@ If applicable, add screenshots to help explain your problem.
**Bug occurs on official PairDrop instance https://pairdrop.net/**
No | Yes
Version: v1.11.1
Version: v1.11.2
**Bug occurs on self-hosted PairDrop instance**
No | Yes
@@ -44,7 +44,7 @@ No | Yes
**Self-Hosted Setup**
Proxy: Nginx | Apache2
Deployment: docker run | docker compose | npm run start:prod
Version: v1.11.1
Version: v1.11.2
**Additional context**
Add any other context about the problem here.

View File

@@ -45,11 +45,11 @@ This pairdrop-cli version was released alongside v1.10.4
#### Linux / Mac
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
```shell
wget "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.1/pairdrop-cli.zip"
wget "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.2/pairdrop-cli.zip"
```
or
```shell
curl -LO "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.1/pairdrop-cli.zip"
curl -LO "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.2/pairdrop-cli.zip"
```
2. Unzip the archive to a folder of your choice e.g. `/usr/share/pairdrop-cli/`
```shell

22
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "pairdrop",
"version": "1.11.1",
"version": "1.11.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "pairdrop",
"version": "1.11.1",
"version": "1.11.2",
"license": "ISC",
"dependencies": {
"express": "^4.18.2",
@@ -318,16 +318,16 @@
}
},
"node_modules/get-intrinsic": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz",
"integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.0",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
@@ -815,9 +815,9 @@
}
},
"node_modules/ws": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
"version": "8.18.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz",
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
"engines": {
"node": ">=10.0.0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "pairdrop",
"version": "1.11.1",
"version": "1.11.2",
"type": "module",
"description": "",
"main": "server/index.js",

View File

@@ -668,7 +668,7 @@
</svg>
<div class="title-wrapper" dir="ltr">
<h1>PairDrop</h1>
<div class="font-subheading">v1.11.1</div>
<div class="font-subheading">v1.11.2</div>
</div>
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
<div class="row">

View File

@@ -1,4 +1,4 @@
const cacheVersion = 'v1.11.1';
const cacheVersion = 'v1.11.2';
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
const relativePathsToCache = [
'./',
@@ -151,7 +151,14 @@ const updateCache = request => new Promise((resolve, reject) => {
// 2. If cache is not available: Fetch from network and update cache.
// This way, cached files are only updated if the cacheVersion is changed
self.addEventListener('fetch', function(event) {
if (event.request.method === "POST") {
const swOrigin = new URL(self.location.href).origin;
const requestOrigin = new URL(event.request.url).origin;
if (swOrigin !== requestOrigin) {
// Do not handle requests from other origin
event.respondWith(fetch(event.request));
}
else if (event.request.method === "POST") {
// Requests related to Web Share Target.
event.respondWith((async () => {
const share_url = await evaluateRequestData(event.request);