wpt-polyfilled

command module
v0.0.0-...-1e1c6ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 20 Imported by: 0

README

WPT with Polyfills

A reverse proxy for wpt.live that injects polyfills from polyfill.io

Hosted

wpt.mysterious-mountain.stream

Example

Compare these in Edge <=18 which does not support EventSource

WPT Live : EventSource URL

Polyfilled : EventSource URL

Run it locally

go get https://github.com/romainmenke/wpt-polyfilled
DEV=true PORT=10345 wpt-polyfilled

visit : bs-local:10345

Deploy it somewhere

ENV Vars :

key value
PUBLIC_ADDR <your-domain>
PORT <your public http port>

DNS :

type name content
CNAME wpt <your host>
CNAME wpt-a <your host>
CNAME wpt-b <your host>

visit : wpt.<your.domain>

How it works

URLs to wpt.live are rewritten so everything goes through the proxy. The proxy injects a script tag for polyfill.io.

Notices

  1. This was created in a couple of hours. Not all tests where validated. I expect issues where urls are encoded and thus not replaced correctly.
  2. I do not own any contents from wpt.live. All credit goes to all maintainers and contributors of wpt

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL