-
Notifications
You must be signed in to change notification settings - Fork 3
Support load configuration settings from Azure Front Door #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zhiyuanliang-ms
wants to merge
30
commits into
preview
Choose a base branch
from
zhiyuanliang/afd-support
base: preview
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+540
−31
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
a0a551e
wip
zhiyuanliang-ms d0ecd09
load from azure front door
zhiyuanliang-ms 8d06357
fix bug
zhiyuanliang-ms 3310171
add more test
zhiyuanliang-ms 6878b64
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms 9af1749
add browser test
zhiyuanliang-ms f97ae3d
update
zhiyuanliang-ms 264113d
update
zhiyuanliang-ms 58d1f2e
fix test
zhiyuanliang-ms 725dd63
remove sync-token header
zhiyuanliang-ms 665af4c
wip
zhiyuanliang-ms 9d63b7c
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms 5087206
update
zhiyuanliang-ms 339b3fa
fix lint
zhiyuanliang-ms b2b76ed
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms 1577bef
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms 87f952b
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms 4480562
update CDN tag
zhiyuanliang-ms d3c5f96
Merge branch 'zhiyuanliang/afd-support' of https://github.com/Azure/A…
zhiyuanliang-ms 414a8c8
disallow sentinel key refresh for AFD
zhiyuanliang-ms bebf549
update
zhiyuanliang-ms 564f16a
update
zhiyuanliang-ms 28d37c2
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms ca056b9
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms b5f26c4
update
zhiyuanliang-ms 5b09aee
update
zhiyuanliang-ms dcf5814
resolve merge conflict
zhiyuanliang-ms 5d9477b
update error message
zhiyuanliang-ms 2599b6a
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-J…
zhiyuanliang-ms 29f7958
update
zhiyuanliang-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| import { PipelinePolicy } from "@azure/core-rest-pipeline"; | ||
|
|
||
| /** | ||
| * The pipeline policy that remove the authorization header from the request to allow anonymous access to the Azure Front Door. | ||
| * @remarks | ||
| * The policy position should be perRetry, since it should be executed after the "Sign" phase: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/src/serviceClient.ts | ||
| */ | ||
| export class AnonymousRequestPipelinePolicy implements PipelinePolicy { | ||
| name: string = "AppConfigurationAnonymousRequestPolicy"; | ||
|
|
||
| async sendRequest(request, next) { | ||
| if (request.headers.has("authorization")) { | ||
avanigupta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| request.headers.delete("authorization"); | ||
| } | ||
| return next(request); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * The pipeline policy that remove the "sync-token" header from the request. | ||
| * The policy position should be perRetry. It should be executed after the SyncTokenPolicy in @azure/app-configuration, which is executed after retry phase: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/app-configuration/src/appConfigurationClient.ts#L198 | ||
| */ | ||
| export class RemoveSyncTokenPipelinePolicy implements PipelinePolicy { | ||
| name: string = "AppConfigurationRemoveSyncTokenPolicy"; | ||
|
|
||
| async sendRequest(request, next) { | ||
| if (request.headers.has("sync-token")) { | ||
| request.headers.delete("sync-token"); | ||
| } | ||
| return next(request); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| export const X_MS_DATE_HEADER = "x-ms-date"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.