# App Proxy Question

**URL:** <https://community.shopify.com/t/app-proxy-question/26351>\
**Category:** Store Design\
**Created:** [November 27, 2020, 6:56pm UTC](https://community.shopify.com/t/app-proxy-question/26351 "2020-11-27T18:56:36Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

App Proxy usage and domains: A store owner asks if calling an app proxy via a fully qualified domain name (FQDN) mapped to the store (e.g., custom domain) is equivalent to using the myshopify.com domain (e.g., /apps/... endpoint). One test initially returned a 403 Forbidden (Cloudflare) until the custom domain was added to the development store; then app proxy calls worked, suggesting both domain approaches can function once properly configured.

Key terms: App Proxy routes /apps/<path> requests from a Shopify storefront to an external app; FQDN is the full domain (e.g., www.example.com); Cloudflare is the CDN/service returning 403 when domain configuration is incomplete.

Issues encountered:
- “Refused to connect” error after resolving an earlier 403, with no solution provided.
- Recent behavior change: POST requests to app proxies returning 400 Bad Request via AJAX, while GET appears unaffected. A code snippet showing headers (X-Shopify-Access-Token, anti-forgery token, JSON content) is central to understanding the problem.

Outcomes: Confirmation that custom domains can be used for app proxy calls once added to the store.

Status: Unresolved for the “refused to connect” and POST 400 errors; others are asked if they experience similar issues.

<div class="post-metadata">

**Author:** ![HunkyBill](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@HunkyBill](https://community.shopify.com/u/HunkyBill)\
**Post date:** [November 27, 2020, 6:56pm UTC](https://community.shopify.com/t/app-proxy-question/26351/1 "2020-11-27T18:56:36Z")

</div>

I know the pattern when I set up an App Proxy. For example, for my Shopify store [https://jigglezoggle.myshopify.com](https://jigglezoggle.myshopify.com) I can have /apps/flooblefart as an endpoint, and Shopify will send my GET or POST to my App when I do an AJAX call to /app/flooblefart with (or without) data. I get back JSON or Liquid, my choice.

So let us say my DNS is mapping that \*.myshopify.com name to [https://www.excellentnews.com](https://www.excellentnews.com). If I make my JS calls to [https://www.excellentnews.com](https://www.excellentnews.com)/apps/flooblefart is that equivalent and acceptable practice?

I am seeing exactly that in a client shop, and it confuses me, and the FQDN is not something I ever considered using. Do most App Proxy calls use FQDN? If yes, why?

---

<div class="post-metadata">

**Author:** ![Gregarican](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/gregarican/32/275516_2.png) [@Gregarican](https://community.shopify.com/u/Gregarican)\
**Post date:** [November 27, 2020, 7:39pm UTC](https://community.shopify.com/t/app-proxy-question/26351/2 "2020-11-27T19:39:05Z")

</div>

For grins I just tried this now for a test. And I received a middleman error from Cloudflare. Assuming on Shopify’s side, since my app proxy receiver doesn’t utilize this service.

403 Forbidden

* * *

cloudflare

---

<div class="post-metadata">

**Author:** ![Gregarican](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/gregarican/32/275516_2.png) [@Gregarican](https://community.shopify.com/u/Gregarican)\
**Post date:** [November 27, 2020, 7:42pm UTC](https://community.shopify.com/t/app-proxy-question/26351/3 "2020-11-27T19:42:43Z")

</div>

Actually, correction. I forgot to add my custom (real) domain name to the development store. Once I did that everything worked fine. The app proxy passed along things okay!

---

<div class="post-metadata">

**Author:** ![HunkyBill](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@HunkyBill](https://community.shopify.com/u/HunkyBill)\
**Post date:** [November 27, 2020, 8:48pm UTC](https://community.shopify.com/t/app-proxy-question/26351/4 "2020-11-27T20:48:56Z")

</div>

So strange but I accept that there are now two ways to work it. Thanks for confirming that!

---

<div class="post-metadata">

**Author:** ![dalwinder](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dalwinder](https://community.shopify.com/u/dalwinder)\
**Post date:** [June 18, 2021, 4:28am UTC](https://community.shopify.com/t/app-proxy-question/26351/5 "2021-06-18T04:28:10Z")

</div>

Hi,

I am getting the same issue, I had fixed the 403 one but a new error occurred " refused to connect." so can you please help me fixing this.

thanks in advance

---

<div class="post-metadata">

**Author:** ![aidendev](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@aidendev](https://community.shopify.com/u/aidendev)\
**Post date:** [July 25, 2024, 8:32pm UTC](https://community.shopify.com/t/app-proxy-question/26351/6 "2024-07-25T20:32:44Z")

</div>

So after revisiting old shopify proxy applications for a little over a year, there seems to have been an update when it comes to making POST requests to App Proxies. I’ve been getting the same 400 Bad Request errors specifically for POST requests only when trying to perform ajax calls to hit my app’s backend methods:

```javascript
$.ajax({
       type: 'POST',
       url: '/apps/member-area',
       headers: {
           'X-Shopify-Access-Token': accessToken,
           'RequestVerificationToken': antiForgeryToken, 
           'Content-Type': 'application/json'

           
       },
       data: JSON.stringify(formData),
       dataType: 'json',
       beforeSend: function (jqXHR, settings) {
           console.log('Request URL:', settings.url);
           console.log('Request Type:', settings.type);
           console.log('Request Headers:', jqXHR.getAllResponseHeaders());
           console.log('Request Data:', settings.data);
       },
       xhr: function () {
           var xhr = new window.XMLHttpRequest();
           xhr.addEventListener('readystatechange', function () {
               if (xhr.readyState === 4) { // DONE
                   console.log('Response Headers:', xhr.getAllResponseHeaders());
                   console.log('Request Data:', xhr);
               }
           });
           return xhr;
       },
       success: function (response) {
           if (response.success) {
               $('#UserFeedbackMessage').text(response.message).css('color', 'green').show();
           } else {
               $('#UserFeedbackMessage').text(response.message).css('color', 'red').show();
           }
       },
       error: function (xhr, status, error) {
           console.error("Error updating collector info:", error);
           console.log("XHR:", xhr);
           console.log("Status:", status);
           console.log("Response Text:", xhr.responseText);
           $('#UserFeedbackMessage').text("An error occurred while updating your profile.").css('color', 'red').show();
       }
   });

```

Have you guys experienced this problem as well?
