Skip to content
File

Blob: src/workerd/api/tests/http-socket-test.wd-test

1.1 KB
1# Copyright (c) 2017-2024 Cloudflare, Inc.
2# Licensed under the Apache 2.0 license found in the LICENSE file or at:
3# https://opensource.org/licenses/Apache-2.0
4 
5using Workerd = import "/workerd/workerd.capnp";
6 
7const config :Workerd.Config = (
8 services = [
9 (
10 name = "main",
11 worker = (
12 modules = [
13 (name = "worker.js", esModule = embed "http-socket-test.js")
14 ],
15 compatibilityFlags = ["nodejs_compat", "experimental"],
16 bindings = [
17 (name = "HTTP_SOCKET_SERVER_PORT", fromEnvironment = "HTTP_SOCKET_SERVER_PORT"),
18 (name = "SOCKET_PARTIALLY_WRITTEN", fromEnvironment = "SOCKET_PARTIALLY_WRITTEN"),
19 (name = "FLUSH_HELLO_SOCKET", fromEnvironment = "FLUSH_HELLO_SOCKET"),
20 (name = "STARTTLS_SOCKET", fromEnvironment = "STARTTLS_SOCKET"),
21 ],
22 )
23 ),
24 ( name = "internet",
25 network = (
26 allow = ["private"],
27 tlsOptions = (
28 trustedCertificates = [
29 embed "starttls-server.pem",
30 ],
31 ),
32 )
33 ),
34 ],
35);