Skip to content

Instantly share code, notes, and snippets.

@jodosha
Created December 8, 2011 11:32
Show Gist options
  • Save jodosha/1446771 to your computer and use it in GitHub Desktop.
Save jodosha/1446771 to your computer and use it in GitHub Desktop.
jQuery(function() {
function baseUri() {
return $('meta[name="base-uri"]').attr('content');
}
jQuery.ajaxSetup({
'beforeSend': function(xhr, settings) {
settings.url = baseUri() + settings.url;
return true;
}
});
});
<!-- ... -->
<meta name="base-uri" content="/epts">
<!-- ... -->
@jodosha
Copy link
Author

jodosha commented Dec 8, 2011

@vjt @amedeo check this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment