Class: Google::Apis::FirebasehostingV1beta1::ServingConfig
- Inherits:
-
Object
- Object
- Google::Apis::FirebasehostingV1beta1::ServingConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firebasehosting_v1beta1/classes.rb,
lib/google/apis/firebasehosting_v1beta1/representations.rb,
lib/google/apis/firebasehosting_v1beta1/representations.rb
Overview
The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific priority order.
Instance Attribute Summary collapse
-
#app_association ⇒ String
How to handle well known App Association files.
-
#clean_urls ⇒ Boolean
(also: #clean_urls?)
Defines whether to drop the file extension from uploaded files.
-
#headers ⇒ Array<Google::Apis::FirebasehostingV1beta1::Header>
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers.
-
#i18n ⇒ Google::Apis::FirebasehostingV1beta1::I18nConfig
If provided, i18n rewrites are enabled.
-
#redirects ⇒ Array<Google::Apis::FirebasehostingV1beta1::Redirect>
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path.
-
#rewrites ⇒ Array<Google::Apis::FirebasehostingV1beta1::Rewrite>
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL.
-
#trailing_slash_behavior ⇒ String
Defines how to handle a trailing slash in the URL path.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ServingConfig
constructor
A new instance of ServingConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ServingConfig
Returns a new instance of ServingConfig.
1563 1564 1565 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1563 def initialize(**args) update!(**args) end |
Instance Attribute Details
#app_association ⇒ String
How to handle well known App Association files.
Corresponds to the JSON property appAssociation
1524 1525 1526 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1524 def app_association @app_association end |
#clean_urls ⇒ Boolean Also known as: clean_urls?
Defines whether to drop the file extension from uploaded files.
Corresponds to the JSON property cleanUrls
1529 1530 1531 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1529 def clean_urls @clean_urls end |
#headers ⇒ Array<Google::Apis::FirebasehostingV1beta1::Header>
An array of objects, where each object specifies a URL pattern that, if
matched to the request URL path, triggers Hosting to apply the specified
custom response headers.
Corresponds to the JSON property headers
1537 1538 1539 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1537 def headers @headers end |
#i18n ⇒ Google::Apis::FirebasehostingV1beta1::I18nConfig
If provided, i18n rewrites are enabled.
Corresponds to the JSON property i18n
1542 1543 1544 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1542 def i18n @i18n end |
#redirects ⇒ Array<Google::Apis::FirebasehostingV1beta1::Redirect>
An array of objects (called redirect rules), where each rule specifies a URL
pattern that, if matched to the request URL path, triggers Hosting to respond
with a redirect to the specified destination path.
Corresponds to the JSON property redirects
1549 1550 1551 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1549 def redirects @redirects end |
#rewrites ⇒ Array<Google::Apis::FirebasehostingV1beta1::Rewrite>
An array of objects (called rewrite rules), where each rule specifies a URL
pattern that, if matched to the request URL path, triggers Hosting to respond
as if the service were given the specified destination URL.
Corresponds to the JSON property rewrites
1556 1557 1558 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1556 def rewrites @rewrites end |
#trailing_slash_behavior ⇒ String
Defines how to handle a trailing slash in the URL path.
Corresponds to the JSON property trailingSlashBehavior
1561 1562 1563 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1561 def trailing_slash_behavior @trailing_slash_behavior end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1568 1569 1570 1571 1572 1573 1574 1575 1576 |
# File 'lib/google/apis/firebasehosting_v1beta1/classes.rb', line 1568 def update!(**args) @app_association = args[:app_association] if args.key?(:app_association) @clean_urls = args[:clean_urls] if args.key?(:clean_urls) @headers = args[:headers] if args.key?(:headers) @i18n = args[:i18n] if args.key?(:i18n) @redirects = args[:redirects] if args.key?(:redirects) @rewrites = args[:rewrites] if args.key?(:rewrites) @trailing_slash_behavior = args[:trailing_slash_behavior] if args.key?(:trailing_slash_behavior) end |