Skip to content

Element API endpoint url for multisites? #192

Closed
@aaronrobb

Description

@aaronrobb

Description

I have a site with multiple "multisite" sites.
When using the Element-api endpoint it only creates it for the base url.
So if we have example.com and sub.example.com, element-api endpoint only gets created for example.com.
The issue is that we have cross-domain policy that won't let the basic example.com urls load on the sub.example.com.

Is there a way to set the endpoint to create/use the currentSite url?

Steps to reproduce

  1. Create endpoints via the element-api.php file
  2. Load sub-domain site and get errors about cross domain loading.

Additional info

  • Craft version: 3.9.5
  • PHP version: 7.4.33
  • Database driver & version: MySQL 5.7.44
  • Plugins & versions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions