GoToSocial/internal/middleware
Daenney 02d6e2e3bc
[feature] Set some security related headers (#3065)
* Set frame-ancestors in the CSP
   This ensures we can't be loaded/embedded in an iframe. It also sets the
   older X-Frame-Options for fallback.
* Disable MIME type sniffing
* Set Referrer-Policy
   This sets the policy such that browsers will never send the Referer
   header along with a request, unless it's a request to the same protocol,
   host/domain and port. Basically, only send it when navigating through
   our own UI, but not anything external.

   The default is strict-origin-when-cross-origin when unset, which sends
   the Referer header for requests unless it's going from HTTPS to HTTP
   (i.e a security downgrade, hence the 'strict').
2024-07-04 10:07:02 +02:00
..
cachecontrol.go
contentsecuritypolicy.go [feature] Set some security related headers (#3065) 2024-07-04 10:07:02 +02:00
contentsecuritypolicy_test.go
cors.go
extraheaders.go [feature] Set some security related headers (#3065) 2024-07-04 10:07:02 +02:00
gzip.go
headerfilter.go
headerfilter_test.go
logger.go [feature] Log pubKeyID for http-signed requests (#2501) 2024-01-09 10:41:15 +01:00
ratelimit.go
ratelimit_test.go
requestid.go
session.go
session_test.go
signaturecheck.go [feature] Try HTTP signature validation with and without query params for incoming requests (#2591) 2024-01-31 14:15:28 +00:00
throttling.go
throttling_test.go [bugfix] increases sleep time before check in throttle test, to give more leeway (#2482) 2024-01-03 10:27:55 +00:00
tokencheck.go
useragent.go
util.go