language router fixes
This commit is contained in:
Родитель
d0722d75b3
Коммит
1d0d7f0552
13
README.md
13
README.md
|
@ -69,8 +69,19 @@ To use this more, your list of backends must be formatted different. See the fol
|
|||
**Note**: This mode currently only supports a list of URLs that is not longer than approx. 14,000 characters.
|
||||
|
||||
Use this command to deploy the ARM template - replace the **backends** parameter with your individual, semicolon-separated list of Event URLs, starting with the language code. Within each language code you can have multiple URLs. In this case, those will be load-balanced as well. There always needs to be at least one URL for English (`en`) as this is used as the fallback option. Also, update **locationSecondary** based on your preferences.
|
||||
|
||||
Let's take the following example:
|
||||
- For **French (fr)**, you have the following three URLs to redirect and load balance users to: **https://URL_FR_1**, **https://URL_FR_2** and **https://URL_FR_3**
|
||||
- For **German (de)**, you have the following single URL to redirect users to: **https://URL_GE_1**
|
||||
- For **English (en)**, you have the following two URLs to redirect and load balance users to: **https://URL_EN_1** and **https://URL_EN_2**
|
||||
|
||||
Here is how you will create the "backends" string for such a configuration:
|
||||
`backends="fr=https://URL_FR_1,https://URL_FR_2,https://URL_FR_3;de=https://URL_GE_1;en=https://URL_EN_1,https://URL_EN_2"`
|
||||
|
||||
Note: all other languages, not specified in the backends definition, will fall into "en" as a default.
|
||||
|
||||
```
|
||||
az deployment group create -g myresource-group --template-file .\main.json -p prefix=myprefix -p locationSecondary=westeurope -p loadBalancingMode=userLanguage -p backends="de=https://teams.microsoft.com/l/meetup-join/19%3ameeting_GERMAN1;fr=https://teams.microsoft.com/l/meetup-join/19%3ameeting_FRENCH1;en=https://teams.microsoft.com/l/meetup-join/19%3ameeting_ENGLISH1,https://teams.microsoft.com/l/meetup-join/19%3ameeting_ENGLISH2"
|
||||
az deployment group create -g myresource-group --template-file .\main.json -p prefix=myprefix -p locationSecondary=westeurope -p loadBalancingMode=userLanguage -p backends="fr=https://URL_FR_1,https://URL_FR_2,https://URL_FR_3;de=https://URL_GE_1;en=https://URL_EN_1,https://URL_EN_2"
|
||||
```
|
||||
|
||||
In this mode, the browser request header `Accept-Language` is being used to determine which URL to use. Alternatively the query parameter `?lang=` can be set, which will then take precedence. For example: [https://{MYPREFIX}globalfrontdoor.azurefd.net?lang=fr]() to force French as the language.
|
||||
|
|
Загрузка…
Ссылка в новой задаче