Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I'm in the middle of writing a NodeBB plugin. Is there anything immediately available within the client side JS that will allow me to get the base URL for ajax calls or should I simply take it from the window object?
Thanks
@CCob config.relative_path
config.relative_path
@PitaJ said in Best way to get base URL from client side JS:
So would I simply take location.origin + config.relative_path as the root to the NodeBB install?
@CCob yep pretty much.
@PitaJ, is there a simple way to find the client IP, similar to config.relative_path?