Open dostapn opened 4 years ago
+1
@itmammoth I need something similar, my app lives in Shopify so the AJAX needs to hit at the app proxy URL, not the current window's URL. Is there a way to set the base URL for the AJAX calls?
Thanks @itmammoth, this solved my issue.
@dostapn I assume this would fix your issue as well.
Edit: This solved my issue but did have to update some cors policies in my Rails app. Something along these lines that would be nice in the future is to be able to scope/modify the route. Again, in my Shopify instance, my app lives at /app_proxy/ so, making the route be scoped to 'app_proxy' would have been nice. This would have solved my issue without updating any cors policies.
I have root url as /somepath/APP At plugin.js we have this code:
need to set variable to url or get it after app initialization.