Skip to content

Commit ebd1d23

Browse files
Google APIscopybara-github
authored andcommitted
feat: add origin to AttributeContext.Request
docs: update comments and formatting PiperOrigin-RevId: 892442206
1 parent ddc4001 commit ebd1d23

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

google/rpc/code.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/rpc/context/attribute_context.proto

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@ import "google/protobuf/duration.proto";
2121
import "google/protobuf/struct.proto";
2222
import "google/protobuf/timestamp.proto";
2323

24-
option cc_enable_arenas = true;
2524
option go_package = "google.golang.org/genproto/googleapis/rpc/context/attribute_context;attribute_context";
2625
option java_multiple_files = true;
2726
option java_outer_classname = "AttributeContextProto";
@@ -203,6 +202,12 @@ message AttributeContext {
203202
// The request authentication. May be absent for unauthenticated requests.
204203
// Derived from the HTTP request `Authorization` header or equivalent.
205204
Auth auth = 13;
205+
206+
// The values from Origin header from the HTTP request, such as
207+
// "https://console.cloud.google.com". Modern browsers can only have one
208+
// origin. Special browsers and/or HTTP clients may require multiple
209+
// origins.
210+
string origin = 14;
206211
}
207212

208213
// This message defines attributes for a typical network response. It

google/rpc/context/audit_context.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/rpc/error_details.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -261,17 +261,17 @@ message BadRequest {
261261
// In this example, in proto `field` could take one of the following values:
262262
//
263263
// * `full_name` for a violation in the `full_name` value
264-
// * `email_addresses[1].email` for a violation in the `email` field of the
264+
// * `email_addresses[0].email` for a violation in the `email` field of the
265265
// first `email_addresses` message
266-
// * `email_addresses[3].type[2]` for a violation in the second `type`
266+
// * `email_addresses[2].type[1]` for a violation in the second `type`
267267
// value in the third `email_addresses` message.
268268
//
269269
// In JSON, the same values are represented as:
270270
//
271271
// * `fullName` for a violation in the `fullName` value
272-
// * `emailAddresses[1].email` for a violation in the `email` field of the
272+
// * `emailAddresses[0].email` for a violation in the `email` field of the
273273
// first `emailAddresses` message
274-
// * `emailAddresses[3].type[2]` for a violation in the second `type`
274+
// * `emailAddresses[2].type[1]` for a violation in the second `type`
275275
// value in the third `emailAddresses` message.
276276
string field = 1;
277277

google/rpc/http.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/rpc/status.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package google.rpc;
1818

1919
import "google/protobuf/any.proto";
2020

21-
option cc_enable_arenas = true;
2221
option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
2322
option java_multiple_files = true;
2423
option java_outer_classname = "StatusProto";

0 commit comments

Comments
 (0)