Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Coding e Sistemistica
  4. Help Center: consigli per il tuo progetto
  5. Cross-Origin Resource Sharing (CORS)

Cross-Origin Resource Sharing (CORS)

Pianificato Fissato Bloccato Spostato Help Center: consigli per il tuo progetto
20 Post 2 Autori 1.1k Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • A
    A
    alessia.byaldino
    scritto su ultima modifica di
    User 0
    #1
    Cross-Origin Resource Sharing (CORS)

    buongiorno, dovrei attivare il CORS, da quanto mi ha detto il proprietario del template che sto utilizzando per poter visualizzare le font awesome, modificando l'htaccess ma non sono capace
    potete darmi una mano per favore?
    uso joomla 3.7.2

    questo è il mio .htaccess e sicuramente è configurato in modo errato

    Always set these headers.

    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
    Header always set Access-Control-Max-Age "1000"
    Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

    Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.

    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} OPTIONS
    RewriteRule ^(.*)$ $1 [R=200,L]

    @package Joomla

    @copyright Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.

    @license GNU General Public License version 2 or later; see LICENSE.txt

    READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!

    The line 'Options +FollowSymLinks' may cause problems with some server configurations.

    It is required for the use of mod_rewrite, but it may have already been set by your

    server administrator in a way that disallows changing it in this .htaccess file.

    If using it causes your site to produce an error, comment it out (add # to the

    beginning of the line), reload your site in your browser and test your sef urls. If

    they work, then it has been set by your server administrator and you do not need to

    set it here.

    No directory listings

    <IfModule autoindex>
    IndexIgnore *
    </IfModule>

    Can be commented out if causes errors, see notes above.

    Options +FollowSymlinks
    Options -Indexes

    Mod_rewrite in use.

    RewriteEngine On

    Begin - Rewrite rules to block out some common exploits.

    If you experience problems on your site then comment out the operations listed

    below by adding a # to the beginning of the line.

    This attempts to block the most common type of exploit attempts on Joomla!

    Block any script trying to base64_encode data within the URL.

    RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]

    Block any script that includes a <script> tag in URL.

    RewriteCond %{QUERY_STRING} (<|%3C)([^s]s)+cript.(>|%3E) [NC,OR]

    Block any script trying to set a PHP GLOBALS variable via URL.

    RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]

    Block any script trying to modify a _REQUEST variable via URL.

    RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})

    Return 403 Forbidden header and show the content of the root home page

    RewriteRule .* index.php [F]

    End - Rewrite rules to block out some common exploits.

    Begin - Custom redirects

    If you need to redirect some pages, or set a canonical non-www to

    www redirect (or vice versa), place that code here. Ensure those

    redirects use the correct RewriteRule syntax and the [R=301,L] flags.

    End - Custom redirects

    Uncomment the following line if your webserver's URL

    is not directly related to physical file paths.

    Update Your Joomla! Directory (just / for root).

    RewriteBase /

    Begin - Joomla! core SEF Section.

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    If the requested path and file is not /index.php and the request

    has not already been internally rewritten to the index.php script

    RewriteCond %{REQUEST_URI} !^/index.php

    and the requested path and file doesn't directly match a physical file

    RewriteCond %{REQUEST_FILENAME} !-f

    and the requested path and file doesn't directly match a physical folder

    RewriteCond %{REQUEST_FILENAME} !-d

    internally rewrite the request to the index.php script

    RewriteRule .* index.php [L]

    End - Joomla! core SEF Section.

    Vi ringrazio

    alessia

    1 Risposta Ultima Risposta
    Miglior risposta 0
    0
    • A
      A
      alessia.byaldino
      scritto su ultima modifica di
      User 0
      #2

      nessuno che mi dia una mano?

      1 Risposta Ultima Risposta
      Miglior risposta 0
      0
      • S
        S
        skylinx
        scritto su ultima modifica di
        User Attivo 0
        #3

        Ciao, nel dev tools per es. di Chrome, vedi l'header Access-Control-Allow-Origin nel response?

        1 Risposta Ultima Risposta
        Miglior risposta 0
        0
        • S
          S
          skylinx
          scritto su ultima modifica di
          User Attivo 0
          #4

          Inoltre e' mod headers abilitato?

          1 Risposta Ultima Risposta
          Miglior risposta 0
          0
          • A
            A
            alessia.byaldino
            scritto su ultima modifica di
            User 0
            #5

            ho questa risposta:

            Failed to load resource: the server responded with a status of 404 (Not Found)
            (index):1 Mixed Content: The page at 'https:...' was loaded over HTTPS, but requested an insecure stylesheet 'http:.../templates/jsn_one2_pro/css/font-awesome.css'. This request has been blocked; the content must be served over HTTPS.
            jquery-migrate-3.0.0.min.js:2 JQMIGRATE: Migrate is installed, version 3.0.0

            1 Risposta Ultima Risposta
            Miglior risposta 0
            0
            • A
              A
              alessia.byaldino
              scritto su ultima modifica di
              User 0
              #6

              ti può aiutare?

              dove controllo se mod headers è abilitato?

              1 Risposta Ultima Risposta
              Miglior risposta 0
              0
              • A
                A
                alessia.byaldino
                scritto su ultima modifica di
                User 0
                #7

                can you write in english?

                1 Risposta Ultima Risposta
                Miglior risposta 0
                0
                • A
                  A
                  alessia.byaldino
                  scritto su ultima modifica di
                  User 0
                  #8

                  this is error: Access to Font at 'https.... has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '.....' is therefore not allowed access.

                  1 Risposta Ultima Risposta
                  Miglior risposta 0
                  0
                  • S
                    S
                    skylinx
                    scritto su ultima modifica di
                    User Attivo 0
                    #9

                    Can you take a screenshot of the dev tools so I can have a look? What is the resource that cannot be found? (404)

                    1 Risposta Ultima Risposta
                    Miglior risposta 0
                    0
                    • S
                      S
                      skylinx
                      scritto su ultima modifica di
                      User Attivo 0
                      #10

                      If you can share the URL I can have a look myself.

                      1 Risposta Ultima Risposta
                      Miglior risposta 0
                      0
                      • A
                        A
                        alessia.byaldino
                        scritto su ultima modifica di
                        User 0
                        #11

                        I cannot post www

                        1 Risposta Ultima Risposta
                        Miglior risposta 0
                        0
                        • A
                          A
                          alessia.byaldino
                          scritto su ultima modifica di
                          User 0
                          #12

                          the site is byaldino with .com

                          1 Risposta Ultima Risposta
                          Miglior risposta 0
                          0
                          • A
                            A
                            alessia.byaldino
                            scritto su ultima modifica di
                            User 0
                            #13

                            https

                            1 Risposta Ultima Risposta
                            Miglior risposta 0
                            0
                            • S
                              S
                              skylinx
                              scritto su ultima modifica di
                              User Attivo 0
                              #14

                              The website makes lots of HTTP requests and loads quite slowly for me (Finland). It took something like 20+ seconds to load the home page alone. It also loads/tries to load some resources from both the www and the naked domain and also from a mix of http and https, which causes some errors.
                              As for the CORS issue, the proper headers must be set for byaldino.r.worldssl.net if I am not mistaken. Which domain was that .htaccess from?

                              1 Risposta Ultima Risposta
                              Miglior risposta 0
                              0
                              • A
                                A
                                alessia.byaldino
                                scritto su ultima modifica di
                                User 0
                                #15

                                now I check it

                                1 Risposta Ultima Risposta
                                Miglior risposta 0
                                0
                                • A
                                  A
                                  alessia.byaldino
                                  scritto su ultima modifica di
                                  User 0
                                  #16

                                  this is my .htaccess

                                  Header set Access-Control-Allow-Origin "*"

                                  <IfModule mod_headers.c>
                                  <FilesMatch "\.(ico|jpe?g|png|gif|swf|css|gz)$">
                                  Header set Cache-Control "max-age=2592000, public"
                                  </FilesMatch>
                                  <FilesMatch "\.(js)$">
                                  Header set Cache-Control "max-age=2592000, private"
                                  </FilesMatch>
                                  <filesMatch "\.(html|htm)$">
                                  Header set Cache-Control "max-age=7200, public"
                                  </filesMatch>
                                  <FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
                                  Header unset Cache-Control
                                  </FilesMatch>
                                  </IfModule>

                                  Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.

                                  RewriteEngine On
                                  RewriteCond %{REQUEST_METHOD} OPTIONS
                                  RewriteRule ^(.*)$ $1 [R=200,L]

                                  @package Joomla

                                  @copyright Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.

                                  @license GNU General Public License version 2 or later; see LICENSE.txt

                                  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!

                                  The line 'Options +FollowSymLinks' may cause problems with some server configurations.

                                  It is required for the use of mod_rewrite, but it may have already been set by your

                                  server administrator in a way that disallows changing it in this .htaccess file.

                                  If using it causes your site to produce an error, comment it out (add # to the

                                  beginning of the line), reload your site in your browser and test your sef urls. If

                                  they work, then it has been set by your server administrator and you do not need to

                                  set it here.

                                  No directory listings

                                  <IfModule autoindex>
                                  IndexIgnore *
                                  </IfModule>

                                  Can be commented out if causes errors, see notes above.

                                  Options +FollowSymlinks
                                  Options -Indexes

                                  Mod_rewrite in use.

                                  RewriteEngine On

                                  <IfModule mod_headers.c>
                                  Header set Access-Control-Allow-Origin "*"
                                  </IfModule>

                                  RewriteCond %{REQUEST_FILENAME} -s [OR]
                                  RewriteCond %{REQUEST_FILENAME} -l [OR]
                                  RewriteCond %{REQUEST_FILENAME} -d
                                  RewriteRule ^.$ - [NC,L]
                                  RewriteRule ^.
                                  $ index.php [NC,L]

                                  Begin - Rewrite rules to block out some common exploits.

                                  If you experience problems on your site then comment out the operations listed

                                  below by adding a # to the beginning of the line.

                                  This attempts to block the most common type of exploit attempts on Joomla!

                                  Block any script trying to base64_encode data within the URL.

                                  RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]

                                  Block any script that includes a <script> tag in URL.

                                  RewriteCond %{QUERY_STRING} (<|%3C)([^s]s)+cript.(>|%3E) [NC,OR]

                                  Block any script trying to set a PHP GLOBALS variable via URL.

                                  RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]

                                  Block any script trying to modify a _REQUEST variable via URL.

                                  RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})

                                  Return 403 Forbidden header and show the content of the root home page

                                  RewriteRule .* index.php [F]

                                  End - Rewrite rules to block out some common exploits.

                                  Begin - Custom redirects

                                  If you need to redirect some pages, or set a canonical non-www to

                                  www redirect (or vice versa), place that code here. Ensure those

                                  redirects use the correct RewriteRule syntax and the [R=301,L] flags.

                                  End - Custom redirects

                                  Uncomment the following line if your webserver's URL

                                  is not directly related to physical file paths.

                                  Update Your Joomla! Directory (just / for root).

                                  RewriteBase /

                                  Begin - Joomla! core SEF Section.

                                  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

                                  If the requested path and file is not /index.php and the request

                                  has not already been internally rewritten to the index.php script

                                  RewriteCond %{REQUEST_URI} !^/index.php

                                  and the requested path and file doesn't directly match a physical file

                                  RewriteCond %{REQUEST_FILENAME} !-f

                                  and the requested path and file doesn't directly match a physical folder

                                  RewriteCond %{REQUEST_FILENAME} !-d

                                  internally rewrite the request to the index.php script

                                  RewriteRule .* index.php [L]

                                  End - Joomla! core SEF Section.

                                  1 Risposta Ultima Risposta
                                  Miglior risposta 0
                                  0
                                  • S
                                    S
                                    skylinx
                                    scritto su ultima modifica di
                                    User Attivo 0
                                    #17

                                    Is that the .htaccess for byaldino.r.worldssl.net?

                                    1 Risposta Ultima Risposta
                                    Miglior risposta 0
                                    0
                                    • S
                                      S
                                      skylinx
                                      scritto su ultima modifica di
                                      User Attivo 0
                                      #18

                                      Hold on, just realised you use the CDN for that domain. You should configure the headers in the CDN resource for this to work. Do you have access to these settings?

                                      1 Risposta Ultima Risposta
                                      Miglior risposta 0
                                      0
                                      • A
                                        A
                                        alessia.byaldino
                                        scritto su ultima modifica di
                                        User 0
                                        #19

                                        yes - I do

                                        1 Risposta Ultima Risposta
                                        Miglior risposta 0
                                        0
                                        • A
                                          A
                                          alessia.byaldino
                                          scritto su ultima modifica di
                                          User 0
                                          #20

                                          ok, I try - thanks for now

                                          1 Risposta Ultima Risposta
                                          Miglior risposta 0
                                          0

                                          Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

                                          Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

                                          Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

                                          Registrati Accedi
                                          Rispondi
                                          • Risposta alla discussione
                                          Effettua l'accesso per rispondere
                                          • Da Vecchi a Nuovi
                                          • Da Nuovi a Vecchi
                                          • Più Voti


                                          • Accedi

                                          • Non hai un account? Registrati

                                          • Accedi o registrati per effettuare la ricerca.
                                          • Primo post
                                            Ultimo post
                                          Home Accedi Registrati
                                          Menu
                                          • CATEGORIES
                                          • La Community Connect.gt
                                          • Presentati alla Community
                                          • News Ufficiali da Connect.gt
                                          • Internet News
                                          • A Scuola Di
                                          • Digital Marketing
                                          • Intelligenza Artificiale
                                          • SEO & GEO
                                          • Web Marketing e Content
                                          • Google Analytics e Web Analytics
                                          • Google Ads & Advertising
                                          • YouTube
                                          • TikTok, Instagram e altri Social
                                          • Google Adsense, Affiliazioni e Guadagno
                                          • E-Commerce
                                          • Coding e Sistemistica
                                          • Help Center: consigli per il tuo progetto
                                          • Hosting e Cloud
                                          • Coding
                                          • CMS & Piattaforme Self-Hosted
                                          • Annunci e Collaborazioni
                                          • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
                                          • Collaborazioni WEB e Lavoro: offro e cerco
                                          • Impresa, Fisco e Leggi
                                          • Consulenza Legale e Professioni Web
                                          • Consulenza Fiscale, Imprese, Startup e P.Iva
                                          • Gli Off Topic
                                          • PC, Smartphone e altri Hardware
                                          • Tutti i Software
                                          • GT Fetish Cafè
                                          • Discussioni
                                          • Non letti 0
                                          • Recenti
                                          • Hashtag
                                          • Popolare
                                          • Utenti
                                          • Privacy
                                          • Termini e condizioni
                                          • © 2026 Search On Media Group S.r.l.