A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::net::ServerHeaderOptions Struct Reference

The response-header policy of one A11 HTTP surface. More...

#include <cpp/a11/net/server_headers.h>

Public Member Functions

absl::Status Validate () const
 

Public Attributes

std::string server = std::string(kServerHeaderValue)
 Server value; empty sends none.
 
CorsOptions cors
 
bool nosniff = true
 Send X-Content-Type-Options: nosniff.
 

Detailed Description

The response-header policy of one A11 HTTP surface.

Carried by each listener's options, so a deployment sets it once per port.

Member Function Documentation

◆ Validate()

absl::Status a11::net::ServerHeaderOptions::Validate ( ) const
Returns
OK if no value would inject a header break.

Member Data Documentation

◆ cors

CorsOptions a11::net::ServerHeaderOptions::cors

◆ nosniff

bool a11::net::ServerHeaderOptions::nosniff = true

Send X-Content-Type-Options: nosniff.

A11's replies state their own content type, so letting a client guess one can only ever be wrong.

◆ server

std::string a11::net::ServerHeaderOptions::server = std::string(kServerHeaderValue)

Server value; empty sends none.


The documentation for this struct was generated from the following files: