0

I recently migrate my server from Apache to Nginx and followed this article to write the config file.

I use this piece of code to force www before all urls:

server {
  listen 80;
  server_name example.com;
  rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www
}

But now in admin panel, I have this error:

XMLHttpRequest cannot load http://example.com/index.php/admin/catalog_category/edit/key/710d9916b160c08e3560406812eb3bf3/?SID=kovh5h4r7etpl0v7cn61t6dil3&isAjax=true. The request was redirected to 'http://www.example.com/index.php/admin/catalog_category/edit/key/710d9916b…r7etpl0v7cn61t6dil3&isAjax=true?SID=kovh5h4r7etpl0v7cn61t6dil3&isAjax=true', which is disallowed for cross-origin requests that require preflight.

How could I fix this problem? Thanks.

1
  • you can fix it by reading your error log message, " which is disallowed for cross-origin requests that require preflight" – user2857 Nov 18 '14 at 13:37
1

So you have a static link to http://example.com/

You should probably be fine by modifying base_url or updating your template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.