Skip to content

Commit 44c497f

Browse files
Google APIscopybara-github
authored andcommitted
feat: add SecurityLevel option on HttpsTrigger
PiperOrigin-RevId: 396889803
1 parent 231af01 commit 44c497f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

google/cloud/functions/v1/functions.proto

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,31 @@ message SourceRepository {
375375

376376
// Describes HttpsTrigger, could be used to connect web hooks to function.
377377
message HttpsTrigger {
378+
// Available security level settings.
379+
//
380+
// This controls the methods to enforce security (HTTPS) on a URL.
381+
//
382+
// If unspecified, SECURE_OPTIONAL will be used.
383+
enum SecurityLevel {
384+
// Unspecified.
385+
SECURITY_LEVEL_UNSPECIFIED = 0;
386+
387+
// Requests for a URL that match this handler that do not use HTTPS are
388+
// automatically redirected to the HTTPS URL with the same path. Query
389+
// parameters are reserved for the redirect.
390+
SECURE_ALWAYS = 1;
391+
392+
// Both HTTP and HTTPS requests with URLs that match the handler succeed
393+
// without redirects. The application can examine the request to determine
394+
// which protocol was used and respond accordingly.
395+
SECURE_OPTIONAL = 2;
396+
}
397+
378398
// Output only. The deployed url for the function.
379399
string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
400+
401+
// The security level for the function.
402+
SecurityLevel security_level = 2;
380403
}
381404

382405
// Describes EventTrigger, used to request events be sent from another

0 commit comments

Comments
 (0)