Git Product home page Git Product logo

http-headers's Issues

Configured Report-To response header is malformed

The Report-To header returned by the plugin is not correctly formed.

A sample header as returned looks like the following (pretty for readability):

{
    "url": "https://example.com/reports",
    "group": "default",
    "max-age": 86400
}

According to Section 3.1 of the specification the JSON object should have:

  • An optional group (string) member
  • An optional include_subdomains (boolean) member
  • A required max_age (number; positive integer) member
  • A required endpoints (array) member

The url member being returned is not expected at the top-level of the JSON object, but instead should be included as a required member of each array element in the endpoints member. Each array element may also include optional priority and weight members, but this is not supported yet by the plugin.

Taking the earlier returned response the correct format would be (pretty for readability):

{
    "group": "default",
    "max_age": 86400,
    "endpoints": [
        {
            "url": "https://example.com/reports"
        }
    ]
}

The UI for configuring this header probably needs to be reworked a bit as it has the following related issues:

  • A group contains one or more endpoints (as array elements). If multiple entries are provided with the same group, they should be added as separate array elements to the endpoints member of the same underlying group.
  • The include_subdomains field is specific to a group and not a url. If two URLs are configured with the same group but different values for include_subdomains, this cannot be represented according to the specification.
  • The same issue applies to max_age, which is specific to a group and not a url.

HTTP Headers does not work for requests targeting a blog's rss feed

Hello,

I tried your plugin and it seems as it doesn't support altering requests that are sent to a WordPress blog's rss feed.

The usual url is https://some-blog.com/feed. Here is my example feed -> https://quickcoder.org/feed

Although I activated the "Access-Control-Allow-Origin" header, it doesn't work for the feed page. I still get a CORS error when using a custom app to access the content. Other pages on my blog work fine though with this app.

If you need further information, I'd be happy to supply those. Thanks!

Add support for the NEL response header

Great work on a fantastic plugin! Makes managing the ever-increasing number of important HTTP headers much easier.

One header the plugin doesn't currently support is the NEL (Network Error Logging) header. This header works in conjunction with the Report-To header to enable browsers to report network events such as failed requests. It's a relatively simple header, and given your existing support for Report-To I expect would be relatively simple to implement. What are your thoughts?

Some background information:

Plugin Vulnerability

A basic CSP setting for beginners

Hi

Thanks a lot for your WordPress HTTP Headers plugin.

Can you please give us a basic setting for the CSP implentation ?
if I follow the recomendations from https://infosec.mozilla.org/guidelines/web_security#content-security-policy I block many things on a basic WP site.

for instance the /wp-admin/plugin-install.php page doesn't display the extension image anymore.

Since your plugin is for WP can you please give this basic settings for the Content Security Policy please?
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.