How to fetch the Base URL in a plugin?

Comments

2 comments

  • Avatar
    Kobbi Gal

    Hi,

     

    You should be able to use JavaScript DOM objects to retrieve the base URL:

    var base_url = window.location.origin;

     

    Hope this helps,

    Kobbi

    0
    Comment actions Permalink
  • Avatar
    Avi Tavdi

    Do you have proxyurl configured? Usually its configured with reverse proxy. if so you can use prism.proxyurl

    0
    Comment actions Permalink

Please sign in to leave a comment.