mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Minor update
This commit is contained in:
parent
5b154a6b20
commit
1ef35244d7
|
@ -17,6 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Security
|
||||
|
||||
## [2.0.1] - 2021-03-11
|
||||
### Changed
|
||||
- [2021-05-21] Update metrics and fix cache directory leak [@carbotaniuman].
|
||||
- [2021-05-21] Change headers to be wildcards [@carbotaniuman].
|
||||
|
||||
## [2.0.0] - 2021-03-11
|
||||
### Changed
|
||||
- [2021-03-11] Switch back to HTTP/1.1 [@carbotaniuman].
|
||||
|
|
|
@ -21,7 +21,7 @@ package mdnet
|
|||
import java.time.Duration
|
||||
|
||||
object Constants {
|
||||
const val CLIENT_BUILD = 30
|
||||
const val CLIENT_BUILD = 31
|
||||
|
||||
@JvmField val MAX_AGE_CACHE: Duration = Duration.ofDays(14)
|
||||
|
||||
|
|
|
@ -67,26 +67,8 @@ class Main : Runnable {
|
|||
""".trimIndent()
|
||||
)
|
||||
|
||||
if (!Files.isDirectory(databaseFolder) || Files.isRegularFile(databaseFolder.resolveSibling(databaseFolder.fileName.toString() + ".mv.db"))) {
|
||||
println()
|
||||
println()
|
||||
println(
|
||||
"""the --database option now takes in the folder with the database file!
|
||||
|(it previously took in the path to the file without any extensions)
|
||||
|if you are using docker update your docker mount settings!
|
||||
|if you are not, manually move update your --database args!
|
||||
|note: the database file itself should be named metadata.{extension}
|
||||
|where {extension} can be `.db` or `.mv.db`
|
||||
|
|
||||
|If this is your first time seeing this message, please check out the support
|
||||
|channel as things HAVE changed. Failure to do so WILL require
|
||||
|a cache wipe.
|
||||
""".trimMargin()
|
||||
)
|
||||
println()
|
||||
println()
|
||||
|
||||
throw IllegalArgumentException()
|
||||
if (!Files.isDirectory(databaseFolder)) {
|
||||
throw IllegalArgumentException("Expected $databaseFolder to be a folder, was a file")
|
||||
}
|
||||
|
||||
if (Files.isRegularFile(databaseFolder)) {
|
||||
|
|
|
@ -181,10 +181,10 @@ class ImageServer(
|
|||
.then { next: HttpHandler ->
|
||||
{ request: Request ->
|
||||
val response = next(request)
|
||||
response.header("access-control-allow-origin", "https://mangadex.org")
|
||||
response.header("access-control-allow-origin", "*")
|
||||
.header("access-control-expose-headers", "*")
|
||||
.header("access-control-allow-methods", "GET")
|
||||
.header("timing-allow-origin", "https://mangadex.org")
|
||||
.header("timing-allow-origin", "*")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ package mdnet.server
|
|||
|
||||
import java.security.MessageDigest
|
||||
|
||||
fun md5Bytes(stringToHash: String) =
|
||||
fun md5Bytes(stringToHash: String): ByteArray =
|
||||
MessageDigest.getInstance("MD5")
|
||||
.digest(stringToHash.toByteArray())
|
||||
|
||||
|
|
Loading…
Reference in a new issue