/// <summary> /// Adds the Report-To header. /// </summary> /// <param name="optionsAction">A delegate used for setting up the <see cref="ReportGroupOptions"/></param> /// <remarks> /// See: https://www.w3.org/TR/CSP/#directive-report-to /// See: https://w3c.github.io/reporting/#group /// </remarks> public void AddReportingGroup(Action <ReportGroupOptions> optionsAction) { ReportGroupOptions rg = new ReportGroupOptions(); optionsAction(rg); reportGroup = rg; }
/// <summary> /// Adds a Report-To header and sets the report-to parameter of the Public-Key-Pins header. /// </summary> /// <param name="optionsAction">A delegate used for setting up the <see cref="ReportGroupOptions"/>.</param> public HpkpOptionsBuilder AddReportingGroup(Action <ReportGroupOptions> optionsAction) { ReportGroupOptions rg = new ReportGroupOptions(); optionsAction(rg); options.ReportingGroup = rg; return(this); }