Page Speed Optimization Libraries
1.13.35.1
|
#include <memory>
#include <string>
#include <vector>
#include "net/instaweb/rewriter/public/csp_directive.h"
#include "pagespeed/kernel/base/string.h"
#include "pagespeed/kernel/base/string_util.h"
#include "pagespeed/kernel/http/google_url.h"
Go to the source code of this file.
Classes | |
class | net_instaweb::CspSourceExpression |
struct | net_instaweb::CspSourceExpression::UrlData |
class | net_instaweb::CspSourceList |
class | net_instaweb::CspPolicy |
class | net_instaweb::CspContext |
Namespaces | |
net_instaweb | |
Unit-test framework for wget fetcher. | |
This provides basic parsing and evaluation of a (subset of) Content-Security-Policy that's relevant for PageSpeed Automatic. CspContext is the main class.
Limitations versus the full spec: 1) We don't fully parse some kinds of source expressions, like nonce and hash ones. 2) Only some of the directives are parsed. 3) URL matching doesn't support WebSocket (ws: and wss:) schemes, since mod_pagespeed doesn't, and they make for some really ugly conditionals.