Skip to content

Commit

Permalink
should work but not sure if change should be in workbenchlibs instead
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBaldo committed Feb 18, 2025
1 parent 8f46e12 commit 167059d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
import akka.http.scaladsl.model.StatusCodes.{BadRequest, Created}
import akka.http.scaladsl.model.HttpMethods.{DELETE, GET}
import akka.http.scaladsl.server.{MethodRejection, PathMatcher, Route}
import akka.http.scaladsl.model.headers.`Cache-Control`
import akka.http.scaladsl.model.headers.{RawHeader, `Cache-Control`}
import akka.http.scaladsl.model.headers.CacheDirectives.`no-cache`
import akka.http.scaladsl.model.headers.Server
import org.broadinstitute.dsde.agora.server.AgoraConfig
import org.broadinstitute.dsde.agora.server.AgoraConfig.authenticationDirectives
import org.broadinstitute.dsde.agora.server.business.{AgoraBusiness, AgoraBusinessExecutionContext}
Expand Down Expand Up @@ -36,7 +35,7 @@ abstract class AgoraService(permissionsDataSource: PermissionsDataSource) extend
final def routes(implicit
executionContext: ExecutionContext,
agoraBusinessExecutionContext: AgoraBusinessExecutionContext): Route =
respondWithHeaders(`Cache-Control`(`no-cache`), Server("")) {
respondWithHeaders(`Cache-Control`(`no-cache`), RawHeader("Server", "")) {
queryAssociatedConfigurationsRoute ~ queryCompatibleConfigurationsRoute ~ querySingleRoute ~
queryMethodDefinitionsRoute ~ queryRoute ~ postRoute
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class AgoraConfigurationsSpec extends ApiServiceSpec with AnyFlatSpecLike with A
}

"Agora" should "never include server version in response header" in {
Get(ApiUtil.Configurations.withLeadingVersion) ~>
routes ~> check {
Get(ApiUtil.Configurations.withLeadingVersion) ~> addHeader(MockAgoraDirectives.mockAccessToken, mockAccessToken) ~> routes ~> check {
assert(header("Server").exists(_.value() == ""))
}
}
Expand Down

0 comments on commit 167059d

Please sign in to comment.