mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 13:47:47 +08:00
FEATURE: add clean support for running Discourse in a subfolder
To setup set DISCOURSE_RELATIVE_URL_ROOT to the folder you wish
This commit is contained in:
@ -142,7 +142,7 @@ class UsersController < ApplicationController
|
||||
|
||||
def my_redirect
|
||||
if current_user.present? && params[:path] =~ /^[a-z\-\/]+$/
|
||||
redirect_to "/users/#{current_user.username}/#{params[:path]}"
|
||||
redirect_to path("/users/#{current_user.username}/#{params[:path]}")
|
||||
return
|
||||
end
|
||||
raise Discourse::NotFound.new
|
||||
|
Reference in New Issue
Block a user