Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

No 'Access-Control-Allow-Origin' +HTTPS


happyvadik
 Share

Recommended Posts

Доброе времени суток.

Есть хост ukraine.com.ua

Есть сайт businessbag.com.ua

После перехода на https  получил такую ошибку:   has been blocked by CORS policy: No 'Access-Control-Allow-Origin'

Failed to load https://www.businessbag.com.ua/index.php?path=67_76&route=module/mega_filter/ajaxinfo&mfilterIdx=1&mfilterRoute=cHJvZHVjdC9jYXRlZ29yeQ%3D%3D&mfilterBTypes=price%2Coption%2Cmanufacturers%2Cattribute: Redirect from 'https://www.businessbag.com.ua/index.php?path=67_76&route=module/mega_filter/ajaxinfo&mfilterIdx=1&mfilterRoute=cHJvZHVjdC9jYXRlZ29yeQ%3D%3D&mfilterBTypes=price%2Coption%2Cmanufacturers%2Cattribute' to 'https://businessbag.com.ua/index.php?path=67_76&route=module/mega_filter/ajaxinfo&mfilterIdx=1&mfilterRoute=cHJvZHVjdC9jYXRlZ29yeQ%3D%3D&mfilterBTypes=price%2Coption%2Cmanufacturers%2Cattribute' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://businessbag.com.ua' is therefore not allowed access.

Нагуглил что значит, но как лечить на ОС не нашел.

Link to comment
Share on other sites


3 минуты назад, todaymars сказал:

Все нормально работает.

Сори, не увидел что в фильтре проблема

 

Да, протупил- не указал. Проблема в категориях с фильтром MFP

Link to comment
Share on other sites


да, но я не знаю где это править. на хосте все переадресации  повключал, думал прокатит- нет

 

я уже все редиректы и разрешения прописал.  не работает.

 

 

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Headers "Content-Type"
    Header set Access-Control-Allow-Methods "GET"
  </FilesMatch>
</IfModule>

 

# Редирект c www на без www
    RewriteCond %{HTTP_HOST} ^www.businessbag.com.ua/
    RewriteRule ^(.*)$ http://www.businessbag.com.ua/$1 [R=301,L]
    # Редирект для главной (с /index.php на /)
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/
    RewriteRule ^index\.html$ / [R=301,L]
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
    RewriteRule ^index\.php$ / [R=301,L]
 

Edited by happyvadik
Link to comment
Share on other sites


и так сам спросил -сам ответыл, но сдела не сам ))

 решено путем редактирования catalog/controller/module/mega_filter.php

-       $data['direction']			= $this->language->get('direction');
-		$data['ajaxInfoUrl']		= $this->parseUrl( $this->url->link( 'module/mega_filter/ajaxinfo', '', 'SSL' ) );
-		$data['ajaxResultsUrl']		= $this->parseUrl( $this->url->link( 'module/mega_filter/results', '', 'SSL' ) );
-		$data['ajaxCategoryUrl']	= $this->parseUrl( $this->url->link( 'module/mega_filter/categories', '', 'SSL' ) );


+		$data['direction']       = $this->language->get('direction');
+		$data['ajaxInfoUrl']     = $this->url->link('module/mega_filter/ajaxinfo', '', 'SSL');
+		$data['ajaxResultsUrl']  = $this->url->link('module/mega_filter/results', '', 'SSL');
+		$data['ajaxCategoryUrl'] = $this->url->link('module/mega_filter/categories', '', 'SSL');

 

Edited by happyvadik
Link to comment
Share on other sites


  • 1 year later...

Похожая проблема

 

Есть основной домен site.ru и поддомен spb.site.ru

 

Делаю заказ с поддомена spb.site.ru

 

захожу в админку основного домена site.ru и хочу отредактировать заказ тот который сделал на поддомене spb.site.ru

 

Но не дает мне этого сделать, в консоле вот такая ошибка 

 

Access to XMLHttpRequest at 'https://spb.site.ru/index.php?route=api/customer&token=' from origin 'https://site.ru' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

Помогите решить проблему

 

 

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.