diff --git a/include/asterisk/http.h b/include/asterisk/http.h
index 72a1649971fe07adbddb52fe85cc31f3e66b741c..1f46b1eed1290a5b067d90b736607e29f3f9df3f 100644
--- a/include/asterisk/http.h
+++ b/include/asterisk/http.h
@@ -105,4 +105,7 @@ void ast_http_uri_unlink_all_with_key(const char *key);
 /*! \brief Return an ast_str malloc()'d string containing an HTTP error message */
 struct ast_str *ast_http_error(int status, const char *title, const char *extra_header, const char *text);
 
+/*! \brief Return the current prefix */
+void ast_http_prefix(char *buf, int len);
+
 #endif /* _ASTERISK_SRV_H */
diff --git a/main/http.c b/main/http.c
index 33818af2c3b5cdcc4469cdac3fe8d4a0755c7cff..3e6f9d0f6e53d204d2a7521ed3d673d3dbcc0ba9 100644
--- a/main/http.c
+++ b/main/http.c
@@ -143,6 +143,13 @@ static uint32_t manid_from_vars(struct ast_variable *sid) {
 	return mngid;
 }
 
+void ast_http_prefix(char *buf, int len)
+{
+	if (buf) {
+		ast_copy_string(buf, prefix, len);
+	}
+}
+
 static struct ast_str *static_callback(struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *vars, struct ast_variable *headers, int *status, char **title, int *contentlength)
 {
 	char *path;