Add Access-Control-Allow-Origin

This commit is contained in:
Fugi 2020-06-15 22:10:36 -07:00
parent 286f2b3bbc
commit 3c7f796c9e
No known key found for this signature in database
GPG key ID: 769DA5494AD7BBCC

View file

@ -232,6 +232,7 @@ class ImageServer(private val cache: DiskLruCache, private val statistics: Atomi
"Cache-Control", "Cache-Control",
listOf("public", MaxAgeTtl(Constants.MAX_AGE_CACHE).toHeaderValue()).joinToString(", ") listOf("public", MaxAgeTtl(Constants.MAX_AGE_CACHE).toHeaderValue()).joinToString(", ")
) )
.header("Access-Control-Allow-Origin", "https://mangadex.org")
.header("Timing-Allow-Origin", "https://mangadex.org") .header("Timing-Allow-Origin", "https://mangadex.org")
.let { .let {
if (length != null) { if (length != null) {