File obs-server-2.10-0030-Revert-frontend-Make-it-possible-to-run-OBS-in-a-sub.patch of Package obs-server

From 05f9335de8ae7953e95ea9a4b15363032bc3ccb9 Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Thu, 20 May 2021 19:30:35 +0100
Subject: [PATCH] Revert "[frontend] Make it possible to run OBS in a
 subdirectory"

This reverts commit 22f13b1ce240d80ba0fcbc973b539008a7d12510.

Mapping Rails application to Rails.application.config.relative_url_root
explicitly breaks deployment to subdirectory using Phusion Passenger
as described in
https://www.phusionpassenger.com/library/deploy/apache/deploy/ruby/

The Rails.application.config.relative_url_root parameter is
set automatically by Phusion Passenger when deployed this way,
and all routes are adjusted accordingly.

Explicit mapping to Rails.application.config.relative_url_root is not
just unnecessary, but it's actually harmful becase it leads to applying
subdirectory prefix twice.

For example, if deploying to "/obs" subdirectory this way, the URL
https://myserver/obs results in 404 error, and application is available
at https://myserver/obs/obs URL.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 src/api/config.ru | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/api/config.ru b/src/api/config.ru
index e7535bd840..afd69639e9 100644
--- a/src/api/config.ru
+++ b/src/api/config.ru
@@ -1,6 +1,4 @@
 # This file is used by Rack-based servers to start the application.
 
 require ::File.expand_path('../config/environment', __FILE__)
-map Rails.application.config.relative_url_root || '/' do
-  run OBSApi::Application
-end
+run OBSApi::Application
-- 
2.31.1