Compare commits
4
Commits
v1.1.0
..
1d10802140
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d10802140
|
||
|
|
62f952ac68
|
||
|
|
c662626bd8
|
||
|
|
e40afb2c3d
|
@@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.jaytux.phoebench"
|
group = "com.jaytux.phoebench"
|
||||||
version = rootProject.version as PhoebenchVersion
|
version = PhoebenchVersion(1, 1, 1)
|
||||||
|
|
||||||
if((version as PhoebenchVersion) < (rootProject.version as PhoebenchVersion))
|
if((version as PhoebenchVersion) < (rootProject.version as PhoebenchVersion))
|
||||||
throw GradleException("CLI Client version must be at least as high as protocol/common version")
|
throw GradleException("CLI Client version must be at least as high as protocol/common version")
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ object ProjectHandlers {
|
|||||||
|
|
||||||
println("\n${it.benchmarks.size} benchmarks:")
|
println("\n${it.benchmarks.size} benchmarks:")
|
||||||
it.benchmarks.forEach { b ->
|
it.benchmarks.forEach { b ->
|
||||||
println(" - [${b.id}] ${b.name} with ${b.entries.size} entries:")
|
println(" - [${b.id}] BENCHMARK ${b.name} (with ${b.entries.size} entries):")
|
||||||
b.entries.forEach { e ->
|
b.entries.forEach { e ->
|
||||||
println(" - [${e.id}] ENTRY versioned ${map[e.versionId]?.name ?: "<invalid version>"} at ${e.timestamp.fmt()} " +
|
println(" - [${e.id}] ENTRY versioned ${map[e.versionId]?.name ?: "<invalid version>"} at ${e.timestamp.fmt()} " +
|
||||||
"(${e.warmups.size} warmup data points, ${e.measurements.size} measurement data points; in ${e.unit.disp})")
|
"(${e.warmups.size} warmup data points, ${e.measurements.size} measurement data points; in ${e.unit.disp})")
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.jaytux.phoebench"
|
group = "com.jaytux.phoebench"
|
||||||
version = PhoebenchVersion(1, 1, 1)
|
version = PhoebenchVersion(1, 1, 2)
|
||||||
|
|
||||||
if((version as PhoebenchVersion) < (rootProject.version as PhoebenchVersion))
|
if((version as PhoebenchVersion) < (rootProject.version as PhoebenchVersion))
|
||||||
throw GradleException("Server version must be at least as high as protocol/common version")
|
throw GradleException("Server version must be at least as high as protocol/common version")
|
||||||
|
|||||||
@@ -37,20 +37,23 @@ fun Application.module() {
|
|||||||
json()
|
json()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
install(SSE) {}
|
|
||||||
|
|
||||||
val allowLocalhost = environment.config.propertyOrNull("ktor.cors.enableLocalhostOn")?.getString() ?: "0"
|
val allowLocalhost = environment.config.propertyOrNull("ktor.cors.enableLocalhostOn")?.getString() ?: "0"
|
||||||
val safeOrigin = environment.config.propertyOrNull("ktor.cors.browserOrigin")?.getString()
|
val safeOrigin = environment.config.propertyOrNull("ktor.cors.browserOrigin")?.getString()
|
||||||
install(CORS) {
|
install(CORS) {
|
||||||
|
// -- methods --
|
||||||
allowMethod(HttpMethod.Options)
|
allowMethod(HttpMethod.Options)
|
||||||
allowMethod(HttpMethod.Delete)
|
allowMethod(HttpMethod.Delete)
|
||||||
allowMethod(HttpMethod.Patch)
|
allowMethod(HttpMethod.Patch)
|
||||||
allowMethod(HttpMethod.Get)
|
allowMethod(HttpMethod.Get)
|
||||||
allowMethod(HttpMethod.Post)
|
allowMethod(HttpMethod.Post)
|
||||||
|
// -- headers --
|
||||||
allowHeader(HttpHeaders.Accept)
|
allowHeader(HttpHeaders.Accept)
|
||||||
|
allowHeader(HttpHeaders.Pragma)
|
||||||
allowHeader(HttpHeaders.Authorization)
|
allowHeader(HttpHeaders.Authorization)
|
||||||
allowHeader(HttpHeaders.ContentType)
|
allowHeader(HttpHeaders.ContentType)
|
||||||
|
allowHeader(HttpHeaders.CacheControl)
|
||||||
|
allowHeader(HttpHeaders.LastEventID)
|
||||||
|
// -- exposed headers --
|
||||||
exposeHeader(HttpHeaders.ContentType)
|
exposeHeader(HttpHeaders.ContentType)
|
||||||
allowCredentials = true
|
allowCredentials = true
|
||||||
allowNonSimpleContentTypes = true
|
allowNonSimpleContentTypes = true
|
||||||
@@ -73,6 +76,8 @@ fun Application.module() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install(SSE) {}
|
||||||
|
|
||||||
install(StatusPages) {
|
install(StatusPages) {
|
||||||
status(HttpStatusCode.Forbidden) { call, status ->
|
status(HttpStatusCode.Forbidden) { call, status ->
|
||||||
call.respond(status, ErrorResponse("Access Forbidden: CORS failed."))
|
call.respond(status, ErrorResponse("Access Forbidden: CORS failed."))
|
||||||
|
|||||||
Reference in New Issue
Block a user