Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
http2-push-manifest
Advanced tools
A utility script for doing http2 push and/or preload.
Generates a list of local static resources used in your web app by outputting a json
file. This file can be read by your web server to more easily construct the
appropriate Link: <URL>; rel=preload
headers(s) for http2 push/preload.
npm install --save-dev http2-push-manifest
npm test
A manifest is not required by the HTTP2 protocol but is useful for telling your server what resources to push with your main page.*
http2-push-manifest
is a Node script for generating a JSON file listing
all of the static resources used on a page. It tries to discover the resources
in an .html file you specify. This file can be read by your web server to more
easily construct the appropriate Link: <URL>; rel=preload
headers(s) used in
HTTP2 push.
By default, the script generates push_manifest.json
in the top level directory
of your app with a mapping of <URL>: <PUSH_PRIORITY>
. Feel free to add/remove
URLs from this list as necessary for your app or change the priority level.
Example of generated push_manifest.json
with discovered resources:
{
"/css/app.css": 1,
"/js/app.js": 1,
"/bower_components/webcomponentsjs/webcomponents-lite.js": 1,
"/bower_components/iron-selector/iron-selection.html": 1,
...
"/elements.html": 1,
"/elements.vulcanize.html": 1
}
Note: right now the SPDY <PUSH_PRIORITY>
is included, but it will be
deprecated in the future as the new HTTP2 standard does not include this field.
Example - list all the static resources of app/index.html
(including sub-HTML Imports):
http2-push-manifest app index.html
Example - list all the resources in static/elements/elements.html
:
http2-push-manifest static/elements elements.html
Example - using a custom manifest filename:
http2-push-manifest path/to/site index.html -m push.json
http2-push-manifest path/to/site index.html --manifest push.json
If you're using App Engine for your server, check out http2push-gae. It leverages this manifest file format and automagically reads
push_mainfest.json
, setting the Link: rel="preload"
header for you.
Simply decorate your request handler like so:
class Handler(http2.PushHandler):
@http2push.push('push_manifest.json')
def get(self):
# Resources in push_manifest.json will be server-pushed with this handler.
FAQs
Generate a list of static resources for http2 push and preload.
The npm package http2-push-manifest receives a total of 5 weekly downloads. As such, http2-push-manifest popularity was classified as not popular.
We found that http2-push-manifest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.