Skip to content

Commit 55d8e4a

Browse files
committed
🤖 Update LLMs files [skip ci]
1 parent e22cc3d commit 55d8e4a

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

‎docusaurus/static/llms-full.txt‎

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ Before going any further into this Strapi Cloud documentation, we recommend you
393393

394394
- **Support** <br/> The level of support provided by the Strapi Support team depends on the Strapi Cloud plan you subscribed for. The Free plan does not include access to support. The Essential and Pro plans include Basic support while the Scale plan includes Standard support. Please refer to the [dedicated support article](https://support.strapi.io/support/solutions/articles/67000680833-what-is-supported-by-the-strapi-team#Not-Supported) for all details regarding support levels.
395395

396+
- **API access in Strapi Cloud vs self-hosted** <br/> The REST and GraphQL APIs behave the same on Strapi Cloud and on self-hosted servers. The only differences are the URLs:
397+
- Base API domain: On Strapi Cloud, your API uses the domain of the environment (e.g. `https://<project>.strapiapp.com/api/...`), or your custom domain if you set one (see [Domains documentation](/cloud/projects/settings#domains)). A self-hosted project would use whatever domain you expose.
398+
- Media Library URLs: Media fields in REST and GraphQL responses from Strapi Cloud always use the project media domain (e.g. `<project>.media.strapiapp.com`), even when you access the API through a custom domain. Self-hosted projects return URLs from the configured upload provider, so the domain can match your own site or CDN. When you move a project from self-hosted to Strapi Cloud, make sure your frontend reads the absolute URLs returned by the API or accepts the Strapi Cloud media domain.
399+
396400

397401

398402
# Strapi Cloud - Dashboard deployment
@@ -1279,6 +1283,10 @@ All existing domains for your Strapi Cloud project are listed in the *Domains*
12791283

12801284
Default domain names are made of 2 randomly generated words followed by a hash. They can be replaced by any custom domain of your choice.
12811285

1286+
:::note
1287+
Custom domains are not available on the Free plan. Downgrading to the Free plan will result in the application domain's being restored to the default one.
1288+
:::
1289+
12821290
1. Click the **Connect new domain** button.
12831291
2. In the window that opens, fill in the following fields:
12841292

@@ -1300,11 +1308,7 @@ When using custom domains, these domains do not apply to the URLs of uploaded as
13001308

13011309
This means that, if your custom domain is hosted at `https://my-custom-domain.com` and your Strapi Cloud project name is `my-strapi-cloud-instance`, API calls will still return URLs such as `https://my-strapi-cloud-instance.media.strapiapp.com/example.png`.
13021310

1303-
Media library queries over REST or GraphQL always return the project media domain on Strapi Cloud. If you move from a self-hosted project, where media URLs can match your own domain or CDN, plan to keep using the absolute URLs from the API or adjust your frontend to allow the Strapi Cloud media domain (see [API access in Strapi Cloud](/cloud/cloud-fundamentals#api-access-in-strapi-cloud-vs-self-hosted) for more details).
1304-
:::
1305-
1306-
:::note
1307-
Custom domains are not available on the Free plan. Downgrading to the Free plan will result in the application domain's being restored to the default one.
1311+
Media library queries over REST or GraphQL always return the project media domain on Strapi Cloud. If you move from a self-hosted project, where media URLs can match your own domain or CDN, plan to keep using the absolute URLs from the API or adjust your frontend to allow the Strapi Cloud media domain (see [Cloud Fundamentals](/cloud/cloud-fundamentals) for more details).
13081312
:::
13091313

13101314
### Variables
@@ -4968,27 +4972,27 @@ Proper implementation largely depends on your project's needs and custom code, b
49684972
};
49694973
```
49704974

4971-
7. Ensure the middleware is configured to apply on some routes. In the `config` object found in the `src/api/[your-api–name]/routes/[your-content-type-name].js` file, define the methods (`create`, `read`, `update`, `delete`) for which you would like the middleware to apply, and declare the `isOwner` middleware for these routes.<br /><br />For instance, if you wish to allow GET (i.e., `read` method) and POST (i.e., `create` method) requests to any user for the `restaurant` content-type in the `restaurant` API, but would like to restrict PUT (i.e., `update` method) and DELETE requests only to the user who created the entry, you could use the following code in the `src/api/restaurant/routes/restaurant.js` file:
4975+
7. Ensure the middleware is configured to apply on some routes. In the `config` object found in the `src/api/[your-api–name]/routes/[your-content-type-name].js` file, define the action keys (`find`, `findOne`, `create`, `update`, `delete`, etc.) for which you would like the middleware to apply, and declare the `isOwner` middleware for these routes.<br /><br />For instance, if you wish to allow GET requests (mapping to the `find` and `findOne` actions) and POST requests (i.e., the `create` action) to any user for the `restaurant` content-type in the `restaurant` API, but would like to restrict PUT (i.e., `update` action) and DELETE requests only to the user who created the entry, you could use the following code in the `src/api/restaurant/routes/restaurant.js` file:
49724976

4973-
```js title="src/api/restaurant/routes/restaurant.js"
4977+
```js title="src/api/restaurant/routes/restaurant.js"
49744978

4975-
/**
4976-
* restaurant router
4977-
*/
4979+
/**
4980+
* restaurant router
4981+
*/
49784982

4979-
const { createCoreRouter } = require("@strapi/strapi").factories;
4983+
const { createCoreRouter } = require("@strapi/strapi").factories;
49804984

4981-
module.exports = createCoreRouter("api::restaurant.restaurant", {
4982-
config: {
4983-
update: {
4984-
middlewares: ["api::restaurant.is-owner"],
4985-
},
4986-
delete: {
4987-
middlewares: ["api::restaurant.is-owner"],
4988-
},
4985+
module.exports = createCoreRouter("api::restaurant.restaurant", {
4986+
config: {
4987+
update: {
4988+
middlewares: ["api::restaurant.is-owner"],
49894989
},
4990-
});
4991-
```
4990+
delete: {
4991+
middlewares: ["api::restaurant.is-owner"],
4992+
},
4993+
},
4994+
});
4995+
```
49924996

49934997
:::info
49944998
You can find more information about route middlewares in the [routes documentation](/cms/backend-customization/routes).

0 commit comments

Comments
 (0)