Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http wasm #1913

Merged
merged 13 commits into from
May 24, 2024
1 change: 0 additions & 1 deletion otoroshi/app/el/el.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import otoroshi.utils.http.RequestImplicits._
import kaleidoscope._
import otoroshi.next.extensions.HttpListenerNames
import otoroshi.next.models.NgRoute
import otoroshi.next.plugins.Keys
import otoroshi.utils.{ReplaceAllWith, TypedMap}
import otoroshi.utils.syntax.implicits._

Expand Down
4 changes: 2 additions & 2 deletions otoroshi/app/next/plugins/graphql.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ object GraphQLQueryConfig {
"query" -> o.query,
"timeout" -> o.timeout,
"response_path" -> o.responsePath.map(JsString.apply).getOrElse(JsNull).asValue,
"response_filter" -> o.responsePath.map(JsString.apply).getOrElse(JsNull).asValue
"response_filter" -> o.responseFilter.map(JsString.apply).getOrElse(JsNull).asValue
)
}
}
Expand Down Expand Up @@ -1164,7 +1164,7 @@ class GraphQLBackend extends NgBackendCall {
builder = customBuilder,
initialData = config.initialData.map(_.as[JsObject]).getOrElse(JsObject.empty),
maxDepth = config.maxDepth,
variables = (jsonBody \ "variables").asOpt[JsValue].getOrElse(Json.obj()).as[JsObject]
variables = (jsonBody \ "variables").asOpt[JsObject].getOrElse(Json.obj())
)
case None => jsonResponse(400, Json.obj("error" -> "query field missing")).future
}
Expand Down
2 changes: 1 addition & 1 deletion otoroshi/app/wasm/host.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import otoroshi.utils.cache.types.UnboundedTrieMap
import otoroshi.utils.json.JsonOperationsHelper
import otoroshi.utils.syntax.implicits._
import otoroshi.utils.{ConcurrentMutableTypedMap, RegexPool, TypedMap}
import otoroshi.wasm.httpwasm.HttpWasmFunctions
import play.api.Logger
import play.api.libs.json._

Expand Down Expand Up @@ -1225,7 +1226,6 @@ object HostFunctions {
Http.getFunctions(config, attrs) ++
State.getFunctions(config, pluginId) ++
DataStore.getFunctions(config, pluginId)

functions.collect {
case func if func.authorized(config) => func.function
}.toArray
Expand Down
Loading
Loading