Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/timonson/deno_tlsify
- Owner: timonson
- License: mit
- Created: 2020-10-30T15:33:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-31T16:51:21.000Z (over 3 years ago)
- Last Synced: 2024-04-13T09:06:22.427Z (7 months ago)
- Topics: deno, tls, webworker, worker
- Language: TypeScript
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!