Skip to content
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

[no-issue] fix: Sem Rush Redirects List #1422

Merged
merged 5 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions backend/semrush-replace-url/index.content.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ async function processFile(filePath, redirects) {

for (const item of redirects) {
const pagePermalink = item.page.replace(wwwazioncom, '').replace('/pt-br', '').replace('/en', '')
const url30x = item.initialUrl === wwwazioncom ? wwwazioncom : item.initialUrl // add .replace(wwwazioncom, '') to find permalinks only
const url200 = item.destinationUrl // add .replace(wwwazioncom, '') to find permalinks only
const url30x = item.initialUrl === wwwazioncom ? wwwazioncom : item.initialUrl.replace(wwwazioncom, '') // add .replace(wwwazioncom, '') to find permalinks only
const url200 = item.destinationUrl.replace(wwwazioncom, '') // add .replace(wwwazioncom, '') to find permalinks only
const isRoot = url30x === wwwazioncom
const rgx = new RegExp(`\\(${url30x}\\)`, 'g')
const rgx = new RegExp(`\\(${url30x}\\#`, 'g')
const contentMatch = utf8Content.match(rgx)

if(!contentMatch) continue
Expand All @@ -73,10 +73,10 @@ async function processFile(filePath, redirects) {
processedCount: ${counterFoundLinks}
}`)

const newContent = findReplace(utf8Content, isRoot ? /\\(https\:\/\/www\.azion\.com\/\\)/ : rgx, `(${url200})`)
const newContent = findReplace(utf8Content, isRoot ? /\\(https\:\/\/www\.azion\.com\/\\)/ : rgx, `(${url200}#`)
await fs.writeFile(filePath, newContent, async (err) => {
if(err) throw err
console.log(`[OK] ${filePath} updated`)
// console.log(`[OK] ${filePath} updated`)
})
}
})
Expand Down
13 changes: 9 additions & 4 deletions backend/semrush-replace-url/index.i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ async function processFile(filePath, redirects) {
const utf8Content = Buffer.from(content).toString('utf-8')

for (const item of redirects) {
const url30x = item.initialUrl === wwwazioncom ? wwwazioncom : item.initialUrl
const url200 = item.destinationUrl
const url30x = item.initialUrl === wwwazioncom ? wwwazioncom : item.initialUrl.replace(wwwazioncom, '')
const url200 = item.destinationUrl.replace(wwwazioncom, '')
const isRoot = url30x === wwwazioncom
const rgx = new RegExp(`'${url30x}'`, 'g')
const rgx = new RegExp(`${url30x}`, 'g')
const contentMatch = utf8Content.match(rgx)

if(!contentMatch) continue
if(!contentMatch) {
// console.log(`NOT MATCH `, `${rgx} : ${url30x}`)
continue
} else {
console.log(`MATCH`, `${rgx} : ${url30x}`)
}
counterFoundLinks++

console.log(`{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ This solution is ideal for organizations looking to safeguard their digital infr
- [Create rules in Rules Engine for Edge Firewall](/en/documentation/products/guides/secure/work-with-rules-engine/).
- Configure the Set WAF Rule Set behavior.
- Configure the Network criteria.
- Configure the [Request URI](/en/documentation/products/guides/bot-manager/#setting-up-the-rules-engine) criteria.
- Configure the [Request URI](/en/documentation/products/guides/bot-manager-lite/#setting-up-the-rules-engine) criteria.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Don't have an edge application? [Start with a template](/en/documentation/produc

**Delivery protocols**

Modify your application to support the available [delivery protocols](/en/documentation/products/edge-application/build/main-settings/#delivery-protocols).
Modify your application to support the available [delivery protocols](/en/documentation/products/build/edge-application/main-settings/#delivery-protocols).

1. Go to the **Main Settings** tab.
2. Under **Protocol Usage**, select **HTTP support**.
Expand All @@ -56,7 +56,7 @@ Don't have an edge application? [Start with a template](/en/documentation/produc

**Delivery ports**

Choose between the supported [delivery ports](/en/documentation/products/edge-application/build/main-settings/#ports) for each protocol selected.
Choose between the supported [delivery ports](/en/documentation/products/build/edge-application/main-settings/#ports) for each protocol selected.

1. Go to the **Main Settings** tab.
2. Under **HTTP Ports**, in addition to port `80`, select port `8008`.
Expand Down Expand Up @@ -106,7 +106,7 @@ Don't have an edge application? [Start with a template](/en/documentation/produc

**Delivery protocols**

Modify your application to support the available [delivery protocols](/en/documentation/products/edge-application/build/main-settings/#delivery-protocols).
Modify your application to support the available [delivery protocols](/en/documentation/products/build/edge-application/main-settings/#delivery-protocols).

1. Go to the **Main Settings** tab.
2. Under **Delivery Protocol**, select **HTTP**.
Expand All @@ -126,7 +126,7 @@ Don't have an edge application? [Start with a template](/en/documentation/produc

**Delivery ports**

Choose between the supported [delivery ports](/en/documentation/products/edge-application/build/main-settings/#ports) for each protocol selected.
Choose between the supported [delivery ports](/en/documentation/products/build/edge-application/main-settings/#ports) for each protocol selected.

1. Go to the **Main Settings** tab.
2. Under **Ports HTTP**, in addition to port `80`, select port `8008`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Fields identified with an asterisk are mandatory.
- **Origin Address** *: the address of the hosted origin the edge application should fetch the content from.
- Example: `www.yourwebsite.com`
- **Custom Host Header**: in some cases, it may be necessary to add host information in the header request to retrieve information from the origin. This variable is used for that purpose.
- Example: `${host}`. Read more about the host header and how to customize it on the [Origins](/en/documentation/products/edge-application/origins/#host-header) documentation.
- Example: `${host}`. Read more about the host header and how to customize it on the [Origins](/en/documentation/products/build/edge-application/origins/#host-header) documentation.

After completing all the information, click the **Deploy** button, located in the bottom-right corner. This will start the deployment process.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Now you can [manage and adjust the settings](#managing-the-template) through Azi
The deployed edge application includes the following rules and settings:

- **Criteria**: if `${uri}` *starts with* `/`.
- **Behavior**: then [Set Origin](/en/documentation/products/edge-application/rules-engine/#set-origin) as `Default Origin`.
- **Behavior**: then [Set Origin](/en/documentation/products/build/edge-application/rules-engine/#set-origin) as `Default Origin`.
- For image optimization and caching, the file extensions that can be enhanced with these configurations are `.jpg`, `.jpeg`, `.bmp`, `.ico`, `.gif`, `.png`.
- For static content, the template supports the common static file extensions.
- Additionally, the template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ A Trusted CA is an entity that is authorized to issue digital certificates that

[Let's Encrypt](https://letsencrypt.org/)™ is a nonprofit global CA that allows people and organizations to obtain, renew, and manage TLS certificates for free. When [creating a Domain](/en/documentation/products/build/edge-application/domains/) with Azion, you may choose to obtain a TLS certificate signed by Let's Encrypt. You can request Let's Encrypt certificates for domains hosted in [Edge DNS](/en/documentation/products/secure/edge-dns/) or in a third-party DNS provider.

Once you [create a domain with Azion](/en/documentation/products/getting-started/#step-4-creating-a-new-domain-associated-with-your-edge-application), you can choose the option **Let's Encrypt** to automatically generate a Let's Encrypt certificate. An entry for this certificate will be listed in the **Digital Certificates** page in [Azion Console](https://console.azion.com). After the certificate undergoes DNS validation, issuance, and storage, it'll become active.
Once you [create a domain with Azion](/en/documentation/products/get-started/#step-4-creating-a-new-domain-associated-with-your-edge-application), you can choose the option **Let's Encrypt** to automatically generate a Let's Encrypt certificate. An entry for this certificate will be listed in the **Digital Certificates** page in [Azion Console](https://console.azion.com). After the certificate undergoes DNS validation, issuance, and storage, it'll become active.

> See [How to generate a Let's Encrypt for your domain](/en/documentation/products/guides/how-to-generate-a-lets-encrypt-certificate/) to know how to validate this type of certificate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You may also bind a **Digital Certificate** to domains that use the HTTPS protoc

| Scope | Resource |
| --- | --- |
| Adding a custom domain | [Getting started](/en/documentation/products/getting-started/#step-3-adding-a-custom-domain) |
| Adding a custom domain | [Getting started](/en/documentation/products/get-started/#step-3-adding-a-custom-domain) |
| About Digital Certificates | [Digital Certificates](/en/documentation/products/secure/edge-firewall/digital-certificates/) |
| About mTLS | [mTLS](/en/documentation/products/secure/edge-firewall/mtls/) |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Find out more about how to automate your browser to obtain other cache data in t
| **STALE** | When choosing to serve [stale cache](#stale-cache), if the origin fails to respond and the edge cache has expired, a stale version of the content is served |
| **UPDATING** | The cached content has expired and a stale cache is being served, but the content is being updated in the origin |
| **REVALIDATED** | The cached content is checked against the origin using conditional headers. If it's still up-to-date, the resource is not retransmitted from the origin |
| **BYPASS** | The edge requests the content from the origin directly instead of using a cached version due to the active [Bypass Cache](/en/documentation/products/edge-application/rules-engine/#bypass-cache) behavior |
| **BYPASS** | The edge requests the content from the origin directly instead of using a cached version due to the active [Bypass Cache](/en/documentation/products/build/edge-application/rules-engine/#bypass-cache) behavior |
| **-** | If no status is received, the content requested is restricted from caching. For instance, if the requested content is a `POST` request and [Caching for POST](/en/documentation/products/build/edge-application/cache-settings/#caching-http-methods) is disabled, the status is not logged |

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ By selecting one of the templates provided by Azion, you can't modify the variab

## Domains

You can associate your [existing domains](/en/documentation/products/build/edge-application/domains/) registered on Azion to your stream. If you haven't registered any domains to your account yet, see the [Creating a new domain associated with your edge application](/en/documentation/products/getting-started/#step-3-adding-a-custom-domain) documentation.
You can associate your [existing domains](/en/documentation/products/build/edge-application/domains/) registered on Azion to your stream. If you haven't registered any domains to your account yet, see the [Creating a new domain associated with your edge application](/en/documentation/products/get-started/#step-3-adding-a-custom-domain) documentation.

When you associate a domain, the events related with that or those specific domains are collected and sent to the endpoint you configure through a Data Stream. You can associate one or more domains and you have the option to **Filter Domains** or select **All Domains**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ A Trusted CA is an entity that is authorized to issue digital certificates that

<LetsEncryptExpiration />

Once you [create a domain with Azion](/en/documentation/products/getting-started/#step-4-creating-a-new-domain-associated-with-your-edge-application), you can choose the option **Let's Encrypt** to automatically generate a Let's Encrypt certificate. An entry for this certificate will be listed in the **Digital Certificates** page in [Azion Console](https://console.azion.com). After the certificate undergoes DNS validation, issuance, and storage, it'll become active.
Once you [create a domain with Azion](/en/documentation/products/get-started/#step-4-creating-a-new-domain-associated-with-your-edge-application), you can choose the option **Let's Encrypt** to automatically generate a Let's Encrypt certificate. An entry for this certificate will be listed in the **Digital Certificates** page in [Azion Console](https://console.azion.com). After the certificate undergoes DNS validation, issuance, and storage, it'll become active.

> See [How to generate a Let's Encrypt for your domain](/en/documentation/products/guides/how-to-generate-a-lets-encrypt-certificate/) to know how to validate this type of certificate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can query the [Bot Manager dataset](/en/documentation/products/guides/query-

### Use Data Stream as observability tool

To set up an edge function, follow the steps in [Setting up the function](/en/documentation/products/guides/bot-manager/#setting-up-the-function).
To set up an edge function, follow the steps in [Setting up the function](/en/documentation/products/guides/bot-manager-lite/#setting-up-the-function).

Then, you can use [Data Stream](/en/documentation/products/observe/data-stream/) to integrate with stream processing, SIEM, and big data platforms by using the **Edge Functions** source and the **Edge Functions Event Collector** template. This way, you can send your logs to the connector you use and monitor Bot Manager events.
<br /><br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Esta solução é ideal para organizações que buscam proteger sua infraestrutu
- [Crie regras no Rules Engine do Edge Firewall](/pt-br/documentacao/produtos/guias/secure/trabalhar-com-rules-engine/).
- Configure o comportamento **Set WAF Rule Set**.
- Configure os critérios de rede.
- Configure os critérios de [Request URI](/pt-br/documentacao/produtos/guias/bot-manager/#configure-o-rules-engine).
- Configure os critérios de [Request URI](/pt-br/documentacao/produtos/guias/bot-manager-lite/#configure-o-rules-engine).

## Documentação relacionada

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Ainda não tem uma edge application? [Comece com um template](/pt-br/documentaca

**Delivery protocols**

Modifique sua aplicação para suportar os [protocolos de entrega](/pt-br/documentacao/produtos/edge-application/main-settings/#protocolos-de-entrega) disponíveis.
Modifique sua aplicação para suportar os [protocolos de entrega](/pt-br/documentacao/produtos/build/edge-application/main-settings/#protocolos-de-entrega) disponíveis.

1. Vá para a aba **Main Settings**.
2. Em **Protocol Usage**, selecione **HTTP support**.
Expand All @@ -60,7 +60,7 @@ Ainda não tem uma edge application? [Comece com um template](/pt-br/documentaca

**Delivery ports**

Escolha entre as [portas de entrega](/pt-br/documentacao/produtos/edge-application/main-settings/#portas) suportadas para cada protocolo selecionado.
Escolha entre as [portas de entrega](/pt-br/documentacao/produtos/build/edge-application/main-settings/#portas) suportadas para cada protocolo selecionado.

1. Vá para a aba **Main Settings**.
2. Em **HTTP Ports**, além da porta `80`, selecione a porta `8008`.
Expand All @@ -78,7 +78,7 @@ Ainda não tem uma edge application? [Comece com um template](/pt-br/documentaca

**Módulos**

Os [Módulos de Edge Application](/pt-br/documentacao/produtos/edge-application/#modules) podem desbloquear funcionalidades e recursos adicionais para suas aplicações. Veja a [página de preços](https://www.azion.com/pt-br/precos/) para mais detalhes.
Os [Módulos de Edge Application](/pt-br/documentacao/produtos/build/edge-application/#modules) podem desbloquear funcionalidades e recursos adicionais para suas aplicações. Veja a [página de preços](https://www.azion.com/pt-br/precos/) para mais detalhes.

Por enquanto, você ativará dois módulos. Os módulos **Application Accelerator** e **Edge Functions** serão usados quando você [ajustar suas configurações de cache](/pt-br/documentacao/produtos/guias/build/ajustar-cache-settings/), [instanciar uma edge function](/pt-br/documentacao/produtos/guias/build/instanciar-edge-functions/) e [Trabalhar com Rules Engine](/pt-br/documentacao/produtos/guias/build/trabalhar-com-rules-engine/).

Expand Down Expand Up @@ -110,7 +110,7 @@ Ainda não tem uma edge application? [Comece com um template](/pt-br/documentaca

**Delivery protocols**

Modifique sua aplicação para suportar os [protocolos de entrega](/pt-br/documentacao/produtos/edge-application/main-settings/#protocolos-de-entrega) disponíveis.
Modifique sua aplicação para suportar os [protocolos de entrega](/pt-br/documentacao/produtos/build/edge-application/main-settings/#protocolos-de-entrega) disponíveis.

1. Vá para a aba **Main Settings**.
2. Em **Delivery Protocol**, selecione **HTTP**.
Expand All @@ -130,7 +130,7 @@ Ainda não tem uma edge application? [Comece com um template](/pt-br/documentaca

**Delivery ports**

Escolha entre as [portas de entrega](/pt-br/documentacao/produtos/edge-application/main-settings/#portas) suportadas para cada protocolo selecionado.
Escolha entre as [portas de entrega](/pt-br/documentacao/produtos/build/edge-application/main-settings/#portas) suportadas para cada protocolo selecionado.

1. Vá para a aba **Main Settings**.
2. Em **HTTP Ports**, além da porta `80`, selecione a porta `8008`.
Expand All @@ -148,7 +148,7 @@ Ainda não tem uma edge application? [Comece com um template](/pt-br/documentaca

**Módulos**

Os [Módulos de Edge Application](/pt-br/documentacao/produtos/edge-application/#modules) podem desbloquear funcionalidades e recursos adicionais para suas aplicações. Veja a [página de preços](https://www.azion.com/pt-br/documentacao/produtos/precos/) para mais detalhes.
Os [Módulos de Edge Application](/pt-br/documentacao/produtos/build/edge-application/#modules) podem desbloquear funcionalidades e recursos adicionais para suas aplicações. Veja a [página de preços](https://www.azion.com/pt-br/documentacao/produtos/precos/) para mais detalhes.

Por enquanto, você ativará dois módulos. Os módulos **Application Accelerator** e **Edge Functions** serão usados quando você [ajustar suas configurações de cache](/pt-br/documentacao/produtos/guias/build/ajustar-cache-settings/), [instanciar uma edge function](/pt-br/documentacao/produtos/guias/build/instanciar-edge-functions/) e [Trabalhar com Rules Engine](/pt-br/documentacao/produtos/guias/build/trabalhar-com-rules-engine/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ O upload de um objeto diferente ou a modificação do conteúdo do objeto usando

### Origem

Com **Edge Storage**, você pode usar buckets como uma [origin](/pt-br/documentacao/produtos/edge-application/origins/#edge-storage) na **Edge Application** da Azion para retirar o conteúdo de uma edge application.
Com **Edge Storage**, você pode usar buckets como uma [origin](/pt-br/documentacao/produtos/build/edge-application/origins/#edge-storage) na **Edge Application** da Azion para retirar o conteúdo de uma edge application.

Você pode determinar se o conteúdo é retirado da raiz do bucket ou de um prefix dentro do bucket.

Expand Down