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