{"id":54395,"date":"2021-09-13T10:58:21","date_gmt":"2021-09-13T16:58:21","guid":{"rendered":"https:\/\/help.foosales.com\/?post_type=docs&#038;p=54395"},"modified":"2026-07-27T13:41:52","modified_gmt":"2026-07-27T19:41:52","slug":"perche-ricevo-un-errore-di-rete-quando-cerco-di-collegarmi-al-mio-negozio","status":"publish","type":"docs","link":"https:\/\/help.foosales.com\/it\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-trying-to-connect-to-my-store\/","title":{"rendered":"Perch\u00e9 ricevo un errore di rete quando cerco di collegarmi al mio negozio?"},"content":{"rendered":"<p>Se si riceve un <strong>errore di rete<\/strong> quando <strong>collegamento al vostro negozio<\/strong>Potrebbe esserci una configurazione del server che impedisce l'invio della richiesta o forse qualche altro errore verificatosi nel back-end di WordPress.<\/p>\n<p>Per verificare se c'\u00e8 stato un errore di WordPress che ha causato il fallimento della connessione, \u00e8 possibile aprire la dashboard di amministrazione di WordPress e navigare in <strong>WooCommerce <\/strong>-&gt;<strong> Stato <\/strong>-&gt;<strong> Registri<\/strong> e visualizzare le ultime <a href=\"https:\/\/woocommerce.com\/document\/finding-php-error-logs\/#woocommerce-fatal-errors-log\" target=\"_blank\" rel=\"noopener\">registro degli errori fatali<\/a>. Da qui, si dovrebbe essere in grado di vedere se ci sono errori relativi a FooSales o eventualmente un conflitto con un altro plugin. Se non ci sono errori o non c'\u00e8 nulla che sembri legato a FooSales, allora potrebbe esserci una configurazione del server che impedisce l'invio della richiesta.<\/p>\n<p>If you are not using web app that is bundled with the FooSales plugin on your own site and are using the hosted web app at <em>https:\/\/web.foosales.com<\/em>, FooSales will to your store from a domain that is different from your domain. Requests between different domains are known as <strong>Richieste di condivisione delle risorse a origine incrociata (CORS)<\/strong>. Il server dovr\u00e0 consentire specificamente questo tipo di richieste. Normalmente i server sono gi\u00e0 configurati per accettare queste richieste e restituire la risposta con le intestazioni appropriate, ma alcuni server potrebbero essere configurati per bloccarle. Il browser <strong>impedire la richiesta<\/strong> dal completamento se la risposta non ha il valore <strong>intestazioni richieste<\/strong>.<\/p>\n<p>Il server deve restituire un oggetto <strong>Intestazione Access-Control-Allow-Origin<\/strong> che consente a FooSales di inviare i dati al vostro negozio. Si pu\u00f2 provare ad aggiungere il seguente codice al tema di WordPress <strong>functions.php<\/strong> per vedere se fa differenza:<\/p>\n<pre>function add_foosales_cors_http_header(){\r\n    header(\"Access-Control-Allow-Origin: https:\/\/web.foosales.com\");\r\n}\r\nadd_action('init','add_foosales_cors_http_header');<\/pre>\n<p>Si pu\u00f2 provare a utilizzare\u00a0<strong>https:\/\/web.foosales.com<\/strong> o semplicemente <strong>*<\/strong> (un asterisco che consente qualsiasi origine) come valore di origine.<\/p>\n<p>Se il codice di cui sopra non funziona, si dovrebbe essere in grado di vedere se questa intestazione \u00e8 abilitata o meno e qual \u00e8 il suo valore se si ha accesso alla configurazione del server. Si pu\u00f2 anche contattare il proprio <strong>amministratore del server<\/strong> o <strong>host web<\/strong> per chiedere di consentire <strong>richieste API REST cross-domain<\/strong> per FooSales. Alcuni browser hanno anche delle impostazioni che possono essere modificate per consentire queste richieste per FooSales. In alternativa, si pu\u00f2 usare un'opzione <strong>server proxy<\/strong> che assicura che tutte le intestazioni corrette siano impostate e restituite tra il vostro sito web e FooSales.<\/p>\n<p>We recommend using the web app that is bundled with the plugin by launching the POS directly from your WordPress admin dashboard. Authentication is handled automatically and and server requests will be made from the same domain, therefore eliminating any CORS issues.<\/p>","protected":false},"featured_media":0,"parent":485,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_is_vendor_doc":"0","footnotes":""},"doc_tag":[98,101,102,103,104,105,106,107,108,109,110,21,16],"class_list":["post-54395","docs","type-docs","status-publish","hentry","doc_tag-api","doc_tag-blocked","doc_tag-cors","doc_tag-cross-origin","doc_tag-headers","doc_tag-network-error","doc_tag-permission","doc_tag-post","doc_tag-proxy","doc_tag-request","doc_tag-rest","doc_tag-rest-api","doc_tag-web-app"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs\/54395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/comments?post=54395"}],"version-history":[{"count":2,"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs\/54395\/revisions"}],"predecessor-version":[{"id":56508,"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs\/54395\/revisions\/56508"}],"up":[{"embeddable":true,"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs\/485"}],"next":[{"title":"Perch\u00e9 ricevo un errore di rete quando invio un ordine?","link":"https:\/\/help.foosales.com\/it\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-submitting-an-order\/","href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs\/1123"}],"prev":[{"title":"Why does FooSales lose its Bluetooth connection to my Star mPOP?","link":"https:\/\/help.foosales.com\/it\/docs\/frequently-asked-questions\/errors\/why-does-foosales-lose-bluetooth-connection-to-my-star-mpop\/","href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/docs\/463"}],"wp:attachment":[{"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/media?parent=54395"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.foosales.com\/it\/wp-json\/wp\/v2\/doc_tag?post=54395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}