Skip to content

Commit

Permalink
[NO-ISSUE] fix: remove 30x (#1419)
Browse files Browse the repository at this point in the history
* chore: backend folder to use to server process

* fix: remove www.azion.com/en redirect to www.azion.com/en/

* wip: saving to generate a commit with the redirects update

* fix: removing from homes the 30x stasus redirect

* wip: replace full url using semrush pdf

* fix: replace links 30x

* fix: permalinks 30x

* fix: space link attribute
  • Loading branch information
robsongajunior authored Jan 7, 2025
1 parent feb57e5 commit e1e5689
Show file tree
Hide file tree
Showing 47 changed files with 15,199 additions and 42 deletions.
116 changes: 116 additions & 0 deletions backend/semrush-replace-url/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import { parse } from 'csv-parse'
import fs from 'fs'
import { createReadStream } from 'fs'
import path from 'path'
import matter from 'gray-matter'


let counterFoundLinks = 0
let PATH = {
csv: './www.azion.com_permanent_redirects_20241225.csv',
docs: `${process.env.OLDPWD}/src/content/docs`
}
const wwwazioncom = 'https://www.azion.com'

function findReplace(content, oldUrl, newUrl) {
return content.replace(oldUrl, newUrl)
}

async function loadRedirects() {
const redirects = []
const parser = createReadStream(PATH.csv).pipe(
parse({
columns: true,
skip_empty_lines: true,
})
)

for await (const record of parser) {
redirects.push({
page: record.page,
initialUrl: record.initial_url,
destinationUrl: record.destination_url,
statusCode: record.status,
discovered: record.discovered
})
}

return redirects
}


async function processFile(filePath, redirects) {
fs.readFile(filePath, async (err, content) => {
if(err) {
console.error(err)
return
}

const { data, content: markdownContent } = matter(content)
const utf8Content = Buffer.from(content).toString('utf-8')

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

if(!contentMatch) continue
counterFoundLinks++

console.log(`{
isRoot: ${isRoot},
pagePermalink: ${pagePermalink},
file: ${filePath},
permalink: ${data.permalink},
rgx: ${rgx},
url30x: ${url30x},
url200: ${url200},
contentMatch: ${contentMatch},
contentMatchCount: ${contentMatch.length},
processedCount: ${counterFoundLinks}
}`)

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`)
})
}
})
}

function processDirectory(directory, redirects) {
fs.readdir(directory, { withFileTypes: true }, (err, entries) => {
if (err) {
console.error('[ERROR] directory can not be readed:', err)
return
}

for (const entry of entries) {
const fullPath = path.join(directory, entry.name)

if(entry.isDirectory()) {
processDirectory(fullPath, redirects)
} else if (entry.isFile()) {
processFile(fullPath, redirects)
} else {
console.error(`[ERROR] ${fullPath} is not a file or directory`)
}
}
})
}

async function main() {
try {
const redirects = await loadRedirects()
processDirectory(PATH.docs, redirects)
} catch (error) {
console.error('[ERROR] ', error)
process.exit(1)
}
}

main()
16 changes: 16 additions & 0 deletions backend/semrush-replace-url/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "semrush-replace-url",
"version": "0.0.1",
"main": "index.js",
"type": "module",
"scripts": {
"start": "node index.js"
},
"author": "[email protected]",
"license": "MIT",
"description": "",
"dependencies": {
"csv-parse": "^5.6.0",
"gray-matter": "^4.0.3"
}
}
15,022 changes: 15,022 additions & 0 deletions backend/semrush-replace-url/www.azion.com_permanent_redirects_20241225.csv

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/content/docs/en/homes/dev-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ product_cards:
- icon: /assets/docs/images/uploads/icon-api.svg
title: GraphQL API
description: 'Request the data you want and receive nothing more, nothing less.'
link: /en/documentation/products/graphql-api/
link: /en/documentation/devtools/graphql-api/
- icon: /assets/docs/images/uploads/vector.svg
title: Terraform
description: Manage your infrastructure as code using the Azion Terraform Provider.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/homes/observe-home.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ product_cards:
- icon: /assets/docs/images/uploads/icon-api.svg
title: GraphQL API
description: 'Request the data you want and receive nothing more, nothing less.'
link: /en/documentation/products/graphql-api/
link: /en/documentation/devtools/graphql-api/
permalink: /documentation/products/observe/
---

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Please direct claims of copyright infringement, including notices or counter-not

Azion Technologies LLC, Legal Department

[www.azion.com](https://www.azion.com/en "Azion")
[www.azion.com](https://www.azion.com/en/ "Azion Technologies")

228 Hamilton Ave., 3rd Floor, Palo Alto CA, USA - 94301

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ These Terms and Conditions for Azion Marketplace Sellers (this "Agreement") gove

**10. Definitions.**

**“Acceptable Use Policy”** – Policy which defines the acceptable use of our Products and Services, available at [https://www.azion.com/en/docs/agreements/acceptable-use-policy/](https://www.azion.com/en/docs/agreements/acceptable-use-policy/).
**“Acceptable Use Policy”** – Policy which defines the acceptable use of our Products and Services, available at [https://www.azion.com/en/docs/agreements/acceptable-use-policy/](https://www.azion.com/en/documentation/agreements/acceptable-use-policy/).

**“Authorized Resale Product”** has the meaning assigned in Section 4.2.

Expand All @@ -156,7 +156,7 @@ These Terms and Conditions for Azion Marketplace Sellers (this "Agreement") gove

**“Azion Marketplace”** means the marketplace operated by Azion located at [https://console.azion.com/marketplace](https://console.azion.com/marketplace), as it may be updated by us from time to time.

**“Azion Marketplace Seller Guide”** describes directives to be followed by ISVs and Authorized Reseller as well as applicable listing fees. It is located at [https://www.azion.com/en/documentation/products/marketplace/marketplace-seller-guide](/en/documentation/products/marketplace/marketplace-seller-guide), as it may be updated by us from time to time.
**“Azion Marketplace Seller Guide”** describes directives to be followed by ISVs and Authorized Reseller as well as applicable listing fees. It is located at [https://www.azion.com/en/documentation/products/marketplace/marketplace-seller-guide](/en/documentation/products/marketplace/marketplace-seller-guide/), as it may be updated by us from time to time.

**“Azion Marketplace Listing Guidelines”** means the guidelines and policies listed at Azion Marketplace and at Azion Marketplace Seller Guide, as they may be updated by us from time to time.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ All Azion products and services are offered as Cloud Services and available thro

**Data Streaming:** a Data Stack module designed to collect data from the Edge Applications or any other Azion's products or services. The Customer will choose which data to be collected and, by doing so, automatically declare to be authorized to collect all the selected data. AZION DOES NOT HOLD RESPONSIBILITY BY: (A) THE USAGE OF THE DATA BY THE CUSTOMER, (B) THE CUSTOMER RIGHTS TO COLLECT THEIR USER'S DATA. The collected data is sent to the customer's infrastructure using the protocol chosen in the Real-Time Manager interface or API by the Customer, formatted in JSON in a configurable template. The data is dispatched in blocks of 2 thousand requests separated by \n, or 60 seconds, whichever happens first. Azion will use all commercially reasonable efforts to send all the data to the Customer's infrastructure, or its suppliers, in real time or with a delay lower than 3 minutes. However, in the case of access peaks, attacks or external causes, the delay can be greater. THE CUSTOMER IS RESPONSIBLE FOR THE AVAILABILITY OF THE INFRASTRUCTURE TO RECEIVE THE DATA AND, IN CASE OF UNAVAILABILITY, AZION CAN DISCARD THE DATA. Except as otherwise provided for in the Customer Agreement or any other documents attached thereto, Data Streaming will be billed considering the (a) Data Streaming Requests and (b) Data Streamed, according to the volumes consumed.

**DDoS Protection:** DDoS Protection will be provided exclusively under the terms available at Azion [DDoS Documentation](https://www.azion.com/pt-br/documentacao/produtos/edge-firewall/ddos-protection/) (“Guidelines”). By using Azion, Customer (i) authorizes Azion to impose the technical measures available on the Azion platform to control or mitigate DDoS attacks, even though such measures may result in performance degradation, and (ii) acknowledges that the Service Level Agreement ("SLA") does not apply while a DDoS attack is underway. The following Azion DDoS Protection service options are available: Standard DDoS Protection: includes the following features: (a) network flow analysis (layers 3 and 4); (b) detection of the most common DDoS attacks, network and transport layers, and (c) mitigation of the most common DDoS attacks, network and transport layers, up to the limit of 5 Gbps. Managed DDoS Protection: includes all of the Standard DDoS Protection features plus: (a) detection of more sophisticated DDoS attacks; (b) cost protection via service credits, when applicable; (c) mitigation of larger DDoS attacks, with three protection limit purchase options: (i) Managed DDoS Protection 20 Gbps, for protection against DDoS attacks of up to 20 Gbps; (ii) Managed DDoS Protection 50 Gbps, for protection against DDoS attacks of up to 50 Gbps; (iii) Managed DDoS Protection Unlimited, for unlimited protection against DDoS attacks, the mitigation may use the entire Azion network, in addition to 24x7 access to our Security Response Team (SRT) upon the purchase our Support Mission Critical service. Attacks exceeding the volumes purchased may be immediately blocked until the attack ends. To be eligible for a Service Credit (a) the DDoS attack must result in a bill that exceed the double of the average monthly consumption in the previous six (6) months, excluding the months in which a DDoS attack took place; (b) in the event of an impossibility to calculate the average monthly consumption in the previous six months, the average consumption volume in the available months will be used as basis; (c) Customer must notify the Azion Technical Support about an attack underway by registering a Support Ticket; (d) the Azion Technical Support must have determined the reported DDoS attack is a legitimate attack; and (e) credit applications must be sent by Customer within 30 days after the disputed service bill is closed. Except as otherwise provided for in the Customer Agreement or any other documents attached thereto, Managed DDoS Protection will be billed at (a) a monthly set fee according to the protection limit purchased (Protection Fee) and, additionally, (b) a fee per total GB traffic (Total Data Transferred). By purchasing our Managed DDoS Protection service, the Customer will be required to pay for a minimum of twelve (12) months of the service. In the event Customer’s average bill exceeds the volume purchased, or in case more than two credits are applied for in a given calendar year, Azion will be entitled to require Customer to pay an additional DDoS Protection Fee for each attack suffered. Only a single credit may be applied each month, even when several attacks take place in the same month. Credits are to be issued as a credit note instead of a revised bill. AZION IS CONSTANTLY SEEKING TO UPGRADE OUR SECURITY MECHANISMS TO MAKE OUR PROTECTION SYSTEMS MORE EFFECTIVE AND REDUCE THE RISK OF IMPACTS TO CUSTOMER APPLICATIONS. HOWEVER, THERE ARE NO GUARANTEES THE DDOS SERVICE WILL BE ABLE TO PREVENT ALL POSSIBLE ATTACKS OR THREATS. CUSTOMERS SHOULD KEEP SECURITY CONTROLS AT THEIR ORIGINS AS WELL. CUSTOMERS ASSUME ALL RISKS OF SERVICE UNAVAILABILITY OWING TO RULES POORLY CONFIGURED IN THE SERVICE.
**DDoS Protection:** DDoS Protection will be provided exclusively under the terms available at Azion [DDoS Documentation](https://www.azion.com/pt-br/documentacao/produtos/secure/edge-firewall/ddos-protection/) (“Guidelines”). By using Azion, Customer (i) authorizes Azion to impose the technical measures available on the Azion platform to control or mitigate DDoS attacks, even though such measures may result in performance degradation, and (ii) acknowledges that the Service Level Agreement ("SLA") does not apply while a DDoS attack is underway. The following Azion DDoS Protection service options are available: Standard DDoS Protection: includes the following features: (a) network flow analysis (layers 3 and 4); (b) detection of the most common DDoS attacks, network and transport layers, and (c) mitigation of the most common DDoS attacks, network and transport layers, up to the limit of 5 Gbps. Managed DDoS Protection: includes all of the Standard DDoS Protection features plus: (a) detection of more sophisticated DDoS attacks; (b) cost protection via service credits, when applicable; (c) mitigation of larger DDoS attacks, with three protection limit purchase options: (i) Managed DDoS Protection 20 Gbps, for protection against DDoS attacks of up to 20 Gbps; (ii) Managed DDoS Protection 50 Gbps, for protection against DDoS attacks of up to 50 Gbps; (iii) Managed DDoS Protection Unlimited, for unlimited protection against DDoS attacks, the mitigation may use the entire Azion network, in addition to 24x7 access to our Security Response Team (SRT) upon the purchase our Support Mission Critical service. Attacks exceeding the volumes purchased may be immediately blocked until the attack ends. To be eligible for a Service Credit (a) the DDoS attack must result in a bill that exceed the double of the average monthly consumption in the previous six (6) months, excluding the months in which a DDoS attack took place; (b) in the event of an impossibility to calculate the average monthly consumption in the previous six months, the average consumption volume in the available months will be used as basis; (c) Customer must notify the Azion Technical Support about an attack underway by registering a Support Ticket; (d) the Azion Technical Support must have determined the reported DDoS attack is a legitimate attack; and (e) credit applications must be sent by Customer within 30 days after the disputed service bill is closed. Except as otherwise provided for in the Customer Agreement or any other documents attached thereto, Managed DDoS Protection will be billed at (a) a monthly set fee according to the protection limit purchased (Protection Fee) and, additionally, (b) a fee per total GB traffic (Total Data Transferred). By purchasing our Managed DDoS Protection service, the Customer will be required to pay for a minimum of twelve (12) months of the service. In the event Customer’s average bill exceeds the volume purchased, or in case more than two credits are applied for in a given calendar year, Azion will be entitled to require Customer to pay an additional DDoS Protection Fee for each attack suffered. Only a single credit may be applied each month, even when several attacks take place in the same month. Credits are to be issued as a credit note instead of a revised bill. AZION IS CONSTANTLY SEEKING TO UPGRADE OUR SECURITY MECHANISMS TO MAKE OUR PROTECTION SYSTEMS MORE EFFECTIVE AND REDUCE THE RISK OF IMPACTS TO CUSTOMER APPLICATIONS. HOWEVER, THERE ARE NO GUARANTEES THE DDOS SERVICE WILL BE ABLE TO PREVENT ALL POSSIBLE ATTACKS OR THREATS. CUSTOMERS SHOULD KEEP SECURITY CONTROLS AT THEIR ORIGINS AS WELL. CUSTOMERS ASSUME ALL RISKS OF SERVICE UNAVAILABILITY OWING TO RULES POORLY CONFIGURED IN THE SERVICE.

**Digital Certificates:** this service brokers and obtains the issuance of shared SSL certificates of the Domain Validated (DV) type from a Certification Authority (CA) chosen by Azion, to be used solely for the Edge Application service. Customers must be able to prove their authority over the desired domains by following the technical procedures set by the CA. SSL certificates and private keys are shared among multiple Customers and will be held exclusively by Azion. Under no circumstances whatsoever will certificates and/or private keys be sent to the Customers. Except as otherwise provided for in the Customer Agreement or any other documents attached thereto, Digital Certificates will be billed considering the number of Digital Certificates according to the volumes consumed.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/pages/changelog/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Fixed timeout occurrence when managing **Edge Functions** and **Edge Services**.

**Marketplace**

- **Azion Marketplace** is officially launched to the market. Marketplace is a digital catalog that makes it easy to find, test, and deploy edge-enabled software that runs anywhere. With a wide range of solutions, Azion clients can use it to easily enhance, compose, or customize their applications. Marketplace also provides means for ISVs, software developers, and open source communities to distribute edge-enabled software to an audience of thousands of active buyers. Get to know more about Marketplace [here](/en/documentation/products/marketplace).
- **Azion Marketplace** is officially launched to the market. Marketplace is a digital catalog that makes it easy to find, test, and deploy edge-enabled software that runs anywhere. With a wide range of solutions, Azion clients can use it to easily enhance, compose, or customize their applications. Marketplace also provides means for ISVs, software developers, and open source communities to distribute edge-enabled software to an audience of thousands of active buyers. Get to know more about Marketplace [here](/en/documentation/products/marketplace/).

**Azion CLI**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import InterfaceNote from '~/includes/snippets/InterfaceNote/en/snippet.mdx'

You can unbind an edge service from an edge node using:

- [Azion Console](/en/documentation/products/guides/how-to-access-azion-console)
- [Azion Console](/en/documentation/products/guides/how-to-access-azion-console/)
- [Azion Real-Time Manager (RTM)](https://manager.azion.com/)
- [Azion API](https://api.azion.com/#4eb8b626-d1a2-48a5-aa7c-77ea0b134b34)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Debugging is only functional for active rule sets. Make sure to activate any rul
## Debugging rules with the GraphQL API

:::tip
Check the [GraphQL API documentation](/en/documentation/products/graphql-api-overview) for more information.
Check the [GraphQL API documentation](/en/documentation/devtools/graphql-api/overview/) for more information.
:::

To query the available rules data in the **GraphQL API**, follow the steps described on [How to query GraphQL requests on Postman](/en/documentation/products/guides/query-graphql-postman/) using the `https://api.azionapi.net/events/graphql` URL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace: docs_guides_debugging_functions_graphql
permalink: /documentation/products/guides/debugging-functions-graphql/
---

You can use the [debugging process](/en/documentation/devtools/debugging/) to identify errors in your functions. One of the options for debugging is using the [GraphQL API](/en/documentation/products/graphql-api-overview).
You can use the [debugging process](/en/documentation/devtools/debugging/) to identify errors in your functions. One of the options for debugging is using the [GraphQL API](/en/documentation/devtools/graphql-api/overview/).

To do so, follow the steps described on [How to query GraphQL requests on Postman](/en/documentation/products/guides/query-graphql-postman/) using the `https://api.azionapi.net/events/graphql` URL.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To configure [Image Processor](/en/documentation/products/build/edge-application

<Fragment slot="panel.console">
1. Access [Azion Console](/en/documentation/products/guides/how-to-access-azion-console/) > **Edge Application**.
2. Select the edge application responsible for managing your images from your list of existing applications or add a new one with the help of the [getting started](/en/documentation/products/getting-started) guide.
2. Select the edge application responsible for managing your images from your list of existing applications or add a new one with the help of the [getting started](/en/documentation/products/get-started/) guide.
3. In the **Cache Settings** tab, add or edit a custom cache policy for your images.
4. In the **Cache Expiration Policies** section, configure the [expiration policy](/en/documentation/products/build/edge-application/cache-settings/#browser-cache-settings) for your images.

Expand Down
Loading

0 comments on commit e1e5689

Please sign in to comment.