Struct shipcat_definitions::structs::kong::Kong [−][src]
pub struct Kong {}Show fields
pub name: String, pub upstream_url: String, pub internal: bool, pub publiclyAccessible: bool, pub authorization: Option<Authorization>, pub uris: Option<String>, pub hosts: Vec<String>, pub auth: Option<Authentication>, pub strip_uri: bool, pub preserve_host: bool, pub cors: Option<Cors>, pub additional_internal_ips: Vec<String>, pub babylon_auth_header: Option<BabylonAuthHeader>, pub upstream_connect_timeout: Option<u32>, pub upstream_send_timeout: Option<u32>, pub upstream_read_timeout: Option<u32>, pub add_headers: BTreeMap<String, String>, pub upstream_service: Option<String>, pub babylon_request_id: bool, pub w3c_trace_context: bool, pub ip_rate_limits: Option<KongRateLimit>, pub user_rate_limits: Option<KongRateLimit>,
Expand description
Kong setup for a service
Fields
name: String
Auto-populated name of service
Set internally, and used for defaults (discards value in manifest)
But overrideable for extra_apis
in Region::kong
.
upstream_url: String
The base target URL that points to your API server.
This URL will be used for proxying requests. For example: https://example.com.
Normal kubernetes value is: raftcat.svc.cluster.local If left blank, this value will be generated with the service name instead of raftcat.
internal: bool
Whether or not to apply the ip whitelisting (?)
publiclyAccessible: bool
Marker for gate to let external traffic in or not
Authorization for API
uris: Option<String>
Simple path based routing
E.g. /raftcat
hosts: Vec<String>
A comma-separated list of domain names that point to your API.
For example: example.com. At least one of hosts, uris, or methods should be specified
auth: Option<Authentication>
strip_uri: bool
When matching an API via one of the uris prefixes, strip that matching prefix from the upstream URI to be requested.
false => application has to listen on the uris
parameter (e.g. /raftcat)
true => application has to listen on /
, but use prefix agnostic urls everywhere.
preserve_host: bool
Preserves host headers to backend service
When matching an API via one of the hosts domain names, make sure the request Host header is forwarded to the upstream service. Kong’s default is false, meaning the upstream Host header will be extracted from the configured upstream_url.
Shipcat assumes a default of true, as the normal use case is to have this enabled.
cors: Option<Cors>
Configuration parameters for Cross Origin Resource Sharing plugin
When set, the plugin is used.
additional_internal_ips: Vec<String>
When internal is set to true, also add allow these ips through
babylon_auth_header: Option<BabylonAuthHeader>
Babyln plugin (Vincent’s) for propagating a core-ruby auth header.
Compatibility layer for old-style core-ruby authorization headers. Deprecated.
upstream_connect_timeout: Option<u32>
The timeout in milliseconds for establishing a connection to your upstream service. Defaults to 6000
upstream_send_timeout: Option<u32>
The timeout in milliseconds between two successive write operations for transmitting a request to your upstream service Defaults to 60000.
upstream_read_timeout: Option<u32>
The timeout in milliseconds between two successive read operations for transmitting a request to your upstream service Defaults to 60000.
add_headers: BTreeMap<String, String>
Extra headers to append to the response from kong after reverse proxying
I.e. the application will receive these extra headers.
add_headers:
Cache-Control: no-cache, no-store
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
upstream_service: Option<String>
babylon_request_id: bool
w3c_trace_context: bool
ip_rate_limits: Option<KongRateLimit>
user_rate_limits: Option<KongRateLimit>
Trait Implementations
impl<'de> Deserialize<'de> for Kong where
Kong: Default,
[src]
impl<'de> Deserialize<'de> for Kong where
Kong: Default,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Kong
impl Send for Kong
impl Sync for Kong
impl Unpin for Kong
impl UnwindSafe for Kong
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,