---
title: AppProxyProvider
description: >-
Sets up a page to render behind a Shopify app proxy, enabling JavaScript and
CSS to be loaded from the app.
> Caution: Because React Router doesn't support URL rewriting, any route using
this component should match the pathname of the proxy URL exactly, and
end in a trailing slash (e.g., `https:///apps/proxy/`).
api_version: v1 latest
api_name: shopify-app-react-router
source_url:
html: >-
https://shopify.dev/docs/api/shopify-app-react-router/latest/entrypoints/appproxyprovider
md: >-
https://shopify.dev/docs/api/shopify-app-react-router/latest/entrypoints/appproxyprovider.md
---
# AppProxyProvider
Sets up a page to render behind a Shopify app proxy, enabling JavaScript and CSS to be loaded from the app.
Caution
Because React Router doesn't support URL rewriting, any route using this component should **match the pathname of the proxy URL exactly**, and **end in a trailing slash** (e.g., `https:///apps/proxy/`).
## AppProxyProviderProps
Props for the `AppProxyProvider` component.
* appUrl
string
required
The URL where the app is hosted. You can set this from the `SHOPIFY_APP_URL` environment variable.
* children
React.ReactNode
The children to render.
Examples
### Examples
* #### Wrap a route with an AppProxyProvider component
##### Description
Wrap your route component in the \`AppProxyProvider\` component and pass in your app URL.
##### /app/routes/\*\*\\/\*.ts
```typescript
import {authenticate} from '~/shopify.server';
import {AppProxyProvider} from '@shopify/shopify-app-react-router/react';
export async function loader({ request }) {
await authenticate.public.appProxy(request);
return json({ appUrl: process.env.SHOPIFY_APP_URL });
}
export default function App() {
const { appUrl } = useLoaderData();
return (
Page content
);
}
```
## Related
[Authenticate app proxy requests. - authenticate.public.appProxy](https://shopify.dev/docs/api/shopify-app-react-router/authenticate/public/app-proxy)
[Create links that work within app proxies. - AppProxyLink](https://shopify.dev/docs/api/shopify-app-react-router/app-proxy-components/appproxylink)