# Blocked by CORS policy

**URL:** <https://forum.hestiacp.com/t/blocked-by-cors-policy/13754>\
**Category:** Community Support\
**Created:** [April 10, 2024, 12:38pm UTC](https://forum.hestiacp.com/t/blocked-by-cors-policy/13754 "2024-04-10T12:38:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaudioSpcSpa](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/c/8e8cbc/32.png) [@ClaudioSpcSpa](https://forum.hestiacp.com/u/ClaudioSpcSpa)\
**Post date:** [April 10, 2024, 12:38pm UTC](https://forum.hestiacp.com/t/blocked-by-cors-policy/13754/1 "2024-04-10T12:38:23Z")

</div>

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 syscon32.cl, 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.

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [April 10, 2024, 12:43pm UTC](https://forum.hestiacp.com/t/blocked-by-cors-policy/13754/2 "2024-04-10T12:43:01Z")

</div>

> <https://serverfault.com/questions/162429/how-do-i-add-access-control-allow-origin-in-nginx>

---

<div class="post-metadata">

**Author:** ![ClaudioSpcSpa](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/c/8e8cbc/32.png) [@ClaudioSpcSpa](https://forum.hestiacp.com/u/ClaudioSpcSpa)\
**Post date:** [April 10, 2024, 1:26pm UTC](https://forum.hestiacp.com/t/blocked-by-cors-policy/13754/3 "2024-04-10T13:26:17Z")

</div>

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:

```auto
Request URL: https://www.syscon32.cl/Usuarios/validar
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 syscon32.cl.conf file.

```auto
<virtualhost *:80>
     ServerName syscon32.cl
     ServerAlias www.syscon32.cl
     ServerAdmin webmaster@syscon32.cl
     DocumentRoot /var/www/html/syscon32.cl/public_html

     RewriteCond %{SERVER_NAME} =syscon32.cl [OR]
     RewriteCond %{SERVER_NAME} =www.syscon32.cl
     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/syscon32.cl/public_html>
         Options -Indexes +FollowSymLinks
         AllowOverride All
         Require all granted
         <IfModule mod_headers.c>
                 Header set Access-Control-Allow-Origin "*"
         </IfModule>
     </Directory>

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

</virtualhost>

```
