Skip to main content

Paths

When creating an edge computing application, by default, a subdomain from the arvanedge.ir domain is assigned to your application. Using paths, you can transfer the traffic and requests from a specific URL of the active domain in Arvancloud CDN to your edge computing application.

Define a Path

After clicking on the desired edge computing application, go to the "Paths" section under the "Triggers" tab and click on the "New Path" button.

In the sidebar, select your domain and then enter the path that you want to connect to the edge computing application.

For example, in this image, we want the requests sent to /app/* to be responded to by the edge computing application.

To define this path using the API, you can use the following sample:

curl --location 'https://napi.arvancloud.ir/edge-computing/1.0/edge-computes/{workers.ID}/routes' --header 'authorization: API KEY' --header 'Content-Type: application/json' --header 'Accept: application/json, text/plain, */*' --data '{"domain":"myexampledomain.ir","url":"/app/*","status":"active"}'

After defining a new path, a page rule will be created to apply these settings to your domain.

Apart from the default path that is defined for sending traffic to the subdomain arvanedge.ir, you can enable, disable, edit, or delete other paths as needed.

To enable or disable a path using the API, you can use the following sample:

curl --location --request PUT 'https://napi.arvancloud.ir/edge-computing/1.0/edge-computes/{workers.ID}/routes//{routes.ID}' --header 'authorization: API KEY' --header 'Content-Type: application/json' --header 'Accept: application/json, text/plain, */*' --data '{"url":"/app/*","status":"inactive"}'