mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-23 19:21:05 +00:00
fix: Configure CORS correctly
This commit is contained in:
@@ -13,10 +13,12 @@ fun Application.configureHTTP() {
|
||||
val configurationRepository = get<ConfigurationRepository>()
|
||||
|
||||
install(CORS) {
|
||||
allowHost(
|
||||
host = configurationRepository.cors.host,
|
||||
subDomains = configurationRepository.cors.subDomains,
|
||||
)
|
||||
configurationRepository.corsAllowedHosts.forEach { host ->
|
||||
allowHost(
|
||||
host = host,
|
||||
schemes = listOf("http", "https")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
install(RateLimit) {
|
||||
|
||||
Reference in New Issue
Block a user