Skip to content

Commit

Permalink
fix default config.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed May 16, 2024
1 parent 8a51249 commit 55f1297
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Binary file modified src/main/resources/wasm/otoroshi-plugin-dynamic-js-modules-runtime.wasm
100644 → 100755
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package otoroshi_plugins.com.cloud.apim.plugins.jsdynmodules

import akka.stream.alpakka.s3._
import akka.stream.alpakka.s3.scaladsl.S3
import akka.stream.scaladsl.Sink
import akka.stream.{Attributes, Materializer}
import akka.stream.alpakka.s3.{ApiVersion, MemoryBufferType, ObjectMetadata, S3Attributes, S3Settings}
import akka.stream.scaladsl.{Sink, StreamConverters}
import akka.util.ByteString
import com.github.blemale.scaffeine.Scaffeine
import io.otoroshi.wasm4s.scaladsl._
Expand All @@ -28,7 +28,6 @@ import software.amazon.awssdk.regions.providers.AwsRegionProvider

import java.io.File
import java.nio.file.Files
import java.util.concurrent.atomic.AtomicReference
import scala.concurrent._
import scala.concurrent.duration._
import scala.util._
Expand Down Expand Up @@ -180,10 +179,11 @@ class JsModulePlugin extends NgAccessValidator with NgRequestTransformer with Ng
description = "This plugin provides the runtime for the Dynamic Js Module Runtime plugin from Cloud APIM",
config = WasmConfig(
source = WasmSource(WasmSourceKind.ClassPath, "wasm/otoroshi-plugin-dynamic-js-modules-runtime.wasm", Json.obj()),
memoryPages = 60,
memoryPages = 200,
wasi = true,
allowedHosts = Seq("*"),
authorizations = WasmAuthorizations().copy(httpAccess = true)
authorizations = WasmAuthorizations().copy(httpAccess = true),
instances = 4
)
)).map(_ => ())
}
Expand Down Expand Up @@ -651,8 +651,8 @@ class JsModulePlugin extends NgAccessValidator with NgRequestTransformer with Ng
cookies = WasmUtils.convertJsonCookies(response).getOrElse(ctx.otoroshiResponse.cookies),
)
case Left(value) => NgPluginHttpResponseHelper.fromResult(Results.BadRequest(value))
}.andThen { case _ =>
vm.release()
}.andThen {
case _ => vm.release()
}
}
})
Expand Down

0 comments on commit 55f1297

Please sign in to comment.