Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/timonson/deno_tlsify

Redirect from HTTP to HTTPS using the Deno Web Workers API
https://github.com/timonson/deno_tlsify

deno tls webworker worker

Last synced: about 1 month ago
JSON representation

Redirect from HTTP to HTTPS using the Deno Web Workers API

Awesome Lists containing this project

README

        

# deno_tlsify

Redirect from HTTP to HTTPS using the Deno Web Workers API.

Run the example with `deno -A --unstable server.ts`.

You can use the worker in your own code by importing the Data URL:

```typescript
import { redirectionWorkerDataUrl } from "https://deno.land/x/deno_tlsify/mod.ts"

const worker = new Worker(redirectionWorkerDataUrl, {
type: "module",
deno: {
namespace: true,
},
})

worker.postMessage({ redirectionUrl: `https://domain.com`, port: 80 })
```

Don't forget to use deno's `--unstable` flag!