Skip to content

Commit ecba12a

Browse files
test
1 parent cd46106 commit ecba12a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

  • DubbindoProvider/src/main/kotlin/com/dubbindo

DubbindoProvider/src/main/kotlin/com/dubbindo/Dubbindo.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,19 @@ class Dubbindo : MainAPI() {
291291
}
292292

293293
// ── Load links ────────────────────────────────────────────────────────────
294+
295+
/**
296+
* Wasabi / AWS S3 pre-signed URL sudah punya credentials di query string
297+
* (X-Amz-Signature, X-Amz-Credential, dll).
298+
* Menambahkan Cookie atau Referer justru bisa menyebabkan SignatureDoesNotMatch.
299+
* URL seperti ini harus dikirim tanpa header tambahan.
300+
*/
301+
private fun isPresignedS3(url: String) =
302+
url.contains("X-Amz-Signature", ignoreCase = true) ||
303+
url.contains("X-Amz-Credential", ignoreCase = true) ||
304+
url.contains("wasabisys.com", ignoreCase = true) ||
305+
url.contains("amazonaws.com", ignoreCase = true)
306+
294307
override suspend fun loadLinks(
295308
data: String,
296309
isCasting: Boolean,
@@ -308,7 +321,9 @@ class Dubbindo : MainAPI() {
308321
callback.invoke(
309322
newExtractorLink(name, name, src, INFER_TYPE) {
310323
quality = video.res?.toIntOrNull() ?: Qualities.Unknown.value
311-
headers = streamHeaders
324+
// Pre-signed S3/Wasabi URL: jangan tambah header apapun
325+
// karena signature dihitung hanya untuk header "host"
326+
headers = if (isPresignedS3(src)) emptyMap() else streamHeaders
312327
}
313328
)
314329
} else {

0 commit comments

Comments
 (0)