knitr::opts_chunk$set(collapse=TRUE, fig.retina=2, message=FALSE, warning=FALSE) options(width=120)
Have Some Fun with 'HTTP' Headers
Methods are provided to retrieve and test 'HTTP' headers from a website. An 'HTTP' request and response header reference/explanatory data frame is also provided via the 'hsecsecan' project (https://github.com/riramar/hsecscan)
The following functions are implemented:
as.data.frame.insensitive
: Turn httr::headers()
objects into a data frameassess_security_headers
: Assess "security" headers for a given URLexplain_headers
: Explain HTTP headers found from a URL requestexplore_app
: A Shiny App for Exploring HTTP Headershttp_headers
: HTTP Header Referenceinstall.packages("hdrs", repos = "https://cinc.rud.is/")
library(hdrs) library(tibble) # for printing # current version packageVersion("hdrs")
httr::HEAD("https://rud.is/b") %>% httr::headers() %>% as.data.frame()
assess_security_headers("https://cran.r-project.org") %>% dplyr::select(-url) %>% gt::gt()
Tsk, tsk…
assess_security_headers("https://rud.is/b") %>% dplyr::select(-url) %>% gt::gt()
Looks like I gots some 'splainin to do as well.
hdrs::explain_headers("https://community.rstudio.com/") %>% dplyr::select(header,value, enable, security_reference, recommendations) %>% gt::gt()
data(http_headers) dplyr::glimpse(http_headers)
cloc::cloc_pkg_md()
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.