FIX: published pages couldn't be routed from inside discourse (#9569)

FIX: published pages couldn’t be routed from inside discourse (#9569)

This will allow to post a link to published page in a post. Before this, users clicking this link would have seen a 404.

ATM /pub is server sider only.

diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.js
index 4ee7e5a..4086ca7 100644
--- a/app/assets/javascripts/discourse/app/lib/url.js
+++ b/app/assets/javascripts/discourse/app/lib/url.js
@@ -28,7 +28,8 @@ const SERVER_SIDE_ONLY = [
   /\.json$/,
   /^\/admin\/upgrade$/,
   /^\/logs($|\/)/,
-  /^\/admin\/logs\/watched_words\/action\/[^\/]+\/download$/
+  /^\/admin\/logs\/watched_words\/action\/[^\/]+\/download$/,
+  /^\/pub\//
 ];
 
 export function rewritePath(path) {

GitHub sha: 4b57eb70

This commit appears in #9569 which was approved by eviltrout. It was merged by jjaffeux.