BuzzingPixel

Ansel for Craft

Ansel for EE

Treasury

Construct

Category Construct

Dashboard (open an issue here)

All Issues

My Issues

News Contact
Log in

Logged in as

Licenses Purchases Profile Change Password Billing Portal Admin
Log Out
Software
Ansel for Craft Ansel for EE Treasury Construct Category Construct
Support
Dashboard (open an issue here) All Issues My Issues
News Contact
Log in
Logged in as:
Licenses Purchases Profile Change Password Billing Portal Log Out
Dashboard All Issues My Issues
Support Dashboard
  1. Home
  2. Home
  3. Support Dashboard
  4. View Issue

Server responded with 0 code — CORS issue on multisite

#179 opened by Torch

Subscribe

Details

See Comments

Public Issue

Visibility: Public
2 replies
Last reply by Torch
Created 6/4/2020 7:40 AM
Updated 6/4/2020 9:32 AM
Ansel for ExpressionEngine 2.1.5
CMS Version: 5.3.2
PHP Version: 7.2.1
MySQL Version: 5.6.38
Additional Environment Details:

MSM setup with 3 sites.

Description

I have 3 sites on one install, I'm getting error on upload to ansel field because of a CORS issue. I only want one domain login (the main site url) to manage all 3 sites. Ansel uploads only seem to work if admin is logged into the cp at the url for the site its trying to upload files for.

Ideally, I'd like one login url and be able to manage each sites ansel fields. But this doesn't seem possible. Any way around this? Or can you confirm the issue so I can find another solution? Thanks!

Replies

  • TJ Draper

    Replied 6/4/2020 8:49 AM, Edited 6/4/2020 9:32 AM

    Unfortunately, Ansel doesn’t have any control over CORS headers. If you upload a file to another site and then Ansel tries to load the resulting image from the other domain and the proper CORS headers aren’t set up, Ansel will not function properly because it will not be able to load the image.

    There are two possible solutions that I can think of:

    1. Whitelist all the domains within the MSM setup for CORS access so each domain in your MSM setup is allowed to access resources across the domains (https://stackoverflow.com/a/1850482)
    2. Make sure the images are available at Control Panel domain and make sure your config is dynamically setting the URL to that domain depending on which site you are on
  • Torch

    Replied 6/4/2020 9:32 AM

    Much appreciated TJ, I'll go about one of those solutions. Thanks for the quick response as well.

Use Markdown for formatting

Details

See Comments

Public Issue

Visibility: Public
2 replies
Last reply by Torch
Created 6/4/2020 7:40 AM
Updated 6/4/2020 9:32 AM
Ansel for ExpressionEngine 2.1.5
CMS Version: 5.3.2
PHP Version: 7.2.1
MySQL Version: 5.6.38
Additional Environment Details:

MSM setup with 3 sites.

Cookie Policy
Privacy Policy
Terms of Service

© 2023 BuzzingPixel, LLC. All rights reserved.