Jump to content

CORS / Adding Access-Control-Allow-Origin rules to JSON feed


Recommended Posts

Question: I’m trying to use Ajax to fetch a JSON feed from a Trumba Connect URL, but I’m unable to due to Cross Origin Resource Sharing (CORS) limitations. Do you have examples of calling a Trumba Connect URL from javascript? If so can URLs be added? We’re getting blocked by CORS policy when I try to retrieve the JSON feed. Would adding Access-Control-Allow-Origin rules on your end the best way to proceed?

Answer: There is a setting on the JSON feed settings where you can specify the domains were CORS should be allowed. To access the setting in Trumba, select the published calendar, and then select Publish Settings>Feeds tab and then select Edit Settings & Styles for the JSON feed. Enter your URL(s) in the Allowed Websites field like below.

NOTEURLs musts be fully qualified (http://www.domain.com | https://www.domain.com). Wildcards are not supported.

 

image.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...