https://github.com/jscheid/wsi-issue-125
https://github.com/jscheid/wsi-issue-125
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jscheid/wsi-issue-125
- Owner: jscheid
- Created: 2020-07-01T21:31:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T10:23:08.000Z (over 3 years ago)
- Last Synced: 2025-07-06T00:37:27.747Z (12 months ago)
- Language: JavaScript
- Size: 1.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SRI and compression
Test case for https://github.com/waysact/webpack-subresource-integrity/issues/125
Needs a recent Node version for Brotli support (tested with v12.18.2)
## Build
```
yarn build
```
## Test Gzip
```
yarn server
```
Open one of the links displayed, open Network tab in your browser and ensure gzip compression is used.
## Test Brotli
Follow instructions to generate self-signed SSL certificate:
https://github.com/http-party/http-server#tlsssl
```
yarn server -S -C cert.pem
```
Open one of the links displayed, open Network tab in your browser and ensure br compression is used.
## Test without compression
```
rm ./dist/*.js.*
yarn server
```
## Test SRI
Edit `dist/index.html` and corrupt both hashes, reload and ensure there is an
error displayed in the console regardless of which compression is used.