Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set both "report-uri" AND "report-to" #37

Closed
OwenMelbz opened this issue Jan 11, 2019 · 1 comment
Closed

Ability to set both "report-uri" AND "report-to" #37

OwenMelbz opened this issue Jan 11, 2019 · 1 comment

Comments

@OwenMelbz
Copy link

Hi,

Recently report-uri has been deprecated - however it's still recommended to provide a URL for this field for older browsers.

However browsers like Chrome are now only using the report-to which defines a group within a new Report-To response header.

Currently the code just runs $compiled []= 'report-to ' . $this->policies['report-uri'] . '; ';

This means the value is always the same for both.

Would it be possible to allow individual control for the report-to directive? this way we can leave a URL for older browsers in the report-uri section and then have a group name in the report-to directive? e.g. something maybe like:

if (empty($this->policies['report-to'])) {
    $compiled []= 'report-to ' . $this->policies['report-uri'] . '; ';
}

Then if the developer defines a report-to it will allow it?

@iangcarroll
Copy link
Contributor

Fixed in #42!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants