diff --git a/GraphClientFactory.md b/GraphClientFactory.md index a446806..d1cbb3b 100644 --- a/GraphClientFactory.md +++ b/GraphClientFactory.md @@ -18,11 +18,31 @@ There are two primary usage scenarios for the client factory. Developers who wi - Set the SdkVersion header with the appropriate moniker based on the following structure `graph-{lang}-{version}`. - Enable the developer to select a supported sovereign cloud using an enumerated list. Selecting the sovereign cloud should ensure that the AuthenticationProvider uses the appropriate Authentication Endpoint. - Enable a developer to configure a HTTP proxy that will be used for outgoing requests. - +- Enable a developer to provide custom hosts. + - `CustomHosts` option should be set on client creation. + - `CustomHosts` option should be made available in the `Context` so that it is available to the middleware during request processing. + - These hostnames are different from the Graph service endpoints on the national clouds. + - Certain workloads error out when an unexpected header is present in the request. The middlewares should check: + - If the request URL is a Graph service endpoint or a custom host provided by the developer, then append request headers or modify the request content. + - Else the middleware should delete request headers added by that middleware. + - Example of an workload error - [LargeFileUploadTask upload to OneDrive caused CORS error due `SDKVersion` telemetry header](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/265) + - Provide capabilities to modify or update the `CustomHosts` option after the client creation. + ## Performance Considerations - If available on the platform, enable gzip compression of requests and responses. +## Future Implementation + +- Enable developers to set `CustomHosts`. The progress can be tracked as follows: +``` +| SDK | Implementation Status| +|-------------|----------------------| +| C# | - | +| JAVA | - | +| PHP | - | +| JavaScript | In Progress | +``` ## Security Considerations - If available on the platform, configure for TLS 1.2 diff --git a/middleware/AuthorizationHandler.md b/middleware/AuthorizationHandler.md index 05f8ded..ad9c3c0 100644 --- a/middleware/AuthorizationHandler.md +++ b/middleware/AuthorizationHandler.md @@ -10,6 +10,10 @@ A piece of client-side middleware intended to allow the use of an authorization - Transparently authorize requests - Accept AuthorizationProvider instance in constructor - Update Authorization Header +- Certain workloads error out when an unexpected header is present in the request. The middlewares should check: + - If the request URL is a Graph serve endpoint or a custom url provided by the developer, then append or update the authorization header. + - Else the middleware should delete authorization header. + Take a request object and use authorization provider to add Authorization header. diff --git a/middleware/TelemetryHandler.md b/middleware/TelemetryHandler.md index aad98cc..f6a5d39 100644 --- a/middleware/TelemetryHandler.md +++ b/middleware/TelemetryHandler.md @@ -36,6 +36,10 @@ Provide a mandatory middleware component that attaches metadata to a Graph reque - `RuntimeEnvironment: Node/1.1` for JavaScript. - `RuntimeEnvironment: JRE/1.1` for Java. +- Certain workloads error out when an unexpected header is present in the request. The middlewares should check: + - If the request URL is a Graph serve endpoint or a custom url provided by the developer, then append or update the telemetry headers. + - Else the middleware should delete telemetry header. + #### Ideal Metadata Capture ``` SdkVersion: graph-dotnet-beta/0.6.0-preview, graph-dotnet-core/1.16.0 (featureUsage=0f)