Blocked by CORS policy

Good day.
Can you please inform me what files and path I should modify to activate CORS, I use debian 10 on Linode with shared sites, I tried on a server with a single site and I was able to run, but here, with several sites running, it does not work. Which configuration files should I modify so that it does not check this in the browser console.

has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

1 Like

Apologies, but I don’t understand where I should put Access-Control-Allow-Origin, eb Hestia, I use Apache, but apparently it also has nginx, so it confuses me.

Additionally, the following appears on the network:

Request URL:
Application Method: POST
Status Code: 301 Moved Permanently
Referrer Policy: strict-origin-when-cross-origin.

On another server with Debian11, with apache and no control panel, I was able to get it to work, with the file.

<virtualhost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/

     RewriteCond %{SERVER_NAME} [OR]
     RewriteCond %{SERVER_NAME}
     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

     <Directory /var/www/html/>
         Options -Indexes +FollowSymLinks
         AllowOverride All
         Require all granted
         <IfModule mod_headers.c>
                 Header set Access-Control-Allow-Origin "*"

     ErrorLog ${APACHE_LOG_DIR}/syscon32.cl_error.log
     CustomLog ${APACHE_LOG_DIR}/syscon32.cl_access.log combined