Title: Proxy-Server?
Last modified: April 19, 2023

---

# Proxy-Server?

 *  Resolved [jtesting](https://wordpress.org/support/users/jtesting/)
 * (@jtesting)
 * [3 years ago](https://wordpress.org/support/topic/proxy-server-7/)
 * Hello, is it possible to use proxy-server with reactpress? I have setupProxy.
   js file that works fine locally when I fetch localhost:3000/api . However, when
   I place the build folder on my wordpress site this fails. What would be the correct
   way to access this endpoint?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [rockiger](https://wordpress.org/support/users/rockiger/)
 * (@rockiger)
 * [3 years ago](https://wordpress.org/support/topic/proxy-server-7/#post-16670434)
 * You probably need to configure the proxy server differently. ReactPress changes
   the `PUBLIC_URL` environment variable in `package.json`, maybe this needs to 
   be accounted for.
 *  Thread Starter [jtesting](https://wordpress.org/support/users/jtesting/)
 * (@jtesting)
 * [3 years ago](https://wordpress.org/support/topic/proxy-server-7/#post-16670516)
 * Ah yes I do see that in the package.json. Taking that into account I updated 
   the code to
 * let url = `${process.env.REACT_APP_PUBLIC_URL}/api`;
 *     fetch(url)
 * However, the request gets sent to which does not exist…
   [https://(wordpress_site_domain)/wp-content/reactpress/apps/demo/build/api](https://(wordpress_site_domain)/wp-content/reactpress/apps/demo/build/api)
 * Any other possible tips?
 *  Plugin Author [rockiger](https://wordpress.org/support/users/rockiger/)
 * (@rockiger)
 * [3 years ago](https://wordpress.org/support/topic/proxy-server-7/#post-16671990)
 * Proxy configurations are not my area of expertise. Maybe activate client-side
   routing. Otherwise, WordPress will ‘catch’ that route.
 *  Thread Starter [jtesting](https://wordpress.org/support/users/jtesting/)
 * (@jtesting)
 * [3 years ago](https://wordpress.org/support/topic/proxy-server-7/#post-16672955)
 * I will give that a try thank you. Also any new updates on the progress towards
   Vite?
 *  Plugin Author [rockiger](https://wordpress.org/support/users/rockiger/)
 * (@rockiger)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/proxy-server-7/#post-16805989)
 * Vite works now. If you follow the docs.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Proxy-Server?’ is closed to new replies.

 * ![](https://ps.w.org/reactpress/assets/icon-256x256.png?rev=2471443)
 * [ReactPress - Create React App for Wordpress](https://wordpress.org/plugins/reactpress/)
 * [Support Threads](https://wordpress.org/support/plugin/reactpress/)
 * [Active Topics](https://wordpress.org/support/plugin/reactpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reactpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reactpress/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [rockiger](https://wordpress.org/support/users/rockiger/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/proxy-server-7/#post-16805989)
 * Status: resolved