From f9ec0107f2b14c982e9631ae5d8ca0b51df9d17c Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 7 Oct 2020 00:28:21 -0500 Subject: [PATCH 1/6] Update docs to reflect redirects being enabled by default Part of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24 Redirects enabled by default in https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/367 --- doc/administration/pages/index.md | 6 +----- doc/administration/pages/source.md | 4 ---- doc/user/project/pages/redirects.md | 15 +++++++-------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index 53b45c0ac831db..aef1461109ba2d 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -235,7 +235,7 @@ control over how the Pages daemon runs and serves content in your environment. | `pages_path` | The directory on disk where pages are stored, defaults to `GITLAB-RAILS/shared/pages`. | `pages_nginx[]` | | | `enable` | Include a virtual host `server{}` block for Pages inside NGINX. Needed for NGINX to proxy traffic back to the Pages daemon. Set to `false` if the Pages daemon should directly receive all requests, for example, when using [custom domains](index.md#custom-domains). -| `FF_ENABLE_REDIRECTS` | Feature flag to enable redirects. See the [redirects documentation](../../user/project/pages/redirects.md#enable-or-disable-redirects) for more info. | +| `FF_ENABLE_REDIRECTS` | Feature flag to disable redirects (enabled by default). See the [redirects documentation](../../user/project/pages/redirects.md#disable-redirects) for more info. | --- @@ -424,10 +424,6 @@ Authority (CA) in the system certificate store. For Omnibus, this is fixed by [installing a custom CA in Omnibus GitLab](https://docs.gitlab.com/omnibus/settings/ssl.html#install-custom-public-certificates). -## Enable redirects - -In GitLab Pages, you can [enable the redirects feature](../../user/project/pages/redirects.md#enable-or-disable-redirects) to configure rules to forward one URL to another using HTTP redirects. - ## Activate verbose logging for daemon Verbose logging was [introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/2533) in diff --git a/doc/administration/pages/source.md b/doc/administration/pages/source.md index 662817e741163e..87217b141a48fc 100644 --- a/doc/administration/pages/source.md +++ b/doc/administration/pages/source.md @@ -347,10 +347,6 @@ world. Custom domains and TLS are supported. 1. Restart NGINX 1. [Restart GitLab](../restart_gitlab.md#installations-from-source) -## Enable redirects - -In GitLab Pages, you can [enable the redirects feature](../../user/project/pages/redirects.md#enable-or-disable-redirects) to configure rules to forward one URL to another using HTTP redirects. - ## NGINX caveats NOTE: **Note:** diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md index ae7b1b4fa6e1d5..fd715e41365b84 100644 --- a/doc/user/project/pages/redirects.md +++ b/doc/user/project/pages/redirects.md @@ -6,9 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Create redirects for GitLab Pages -> - [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24) in GitLab Pages 1.25.0 and GitLab 13.4. -> - It's [deployed behind a feature flag](#enable-or-disable-redirects), disabled by default. -> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-redirects). +> - [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24) in GitLab Pages 1.25.0 and GitLab 13.4 behind a feature flag. +> - It's [deployed behind a feature flag](#enable-or-disable-redirects), enabled by default. CAUTION: **Warning:** This feature might not be available to you. Check the **version history** note above for details. @@ -105,19 +104,19 @@ rule 10: valid rule 11: valid ``` -## Enable or disable redirects +## Disable redirects Redirects in GitLab Pages is under development and not ready for production use. It is -deployed behind a feature flag that is **disabled by default**. +deployed behind a feature flag that is **enabled by default**. -For [Omnibus installations](../../../administration/pages/index.md), define the +To disable redirects, for [Omnibus installations](../../../administration/pages/index.md), define the `FF_ENABLE_REDIRECTS` environment variable in the [global settings](../../../administration/pages/index.md#global-settings). Add the following line to `/etc/gitlab/gitlab.rb` and [reconfigure the instance](../../../administration/restart_gitlab.md#omnibus-gitlab-reconfigure). ```ruby -gitlab_pages['env']['FF_ENABLE_REDIRECTS'] = 'true' +gitlab_pages['env']['FF_ENABLE_REDIRECTS'] = 'false' ``` For [source installations](../../../administration/pages/source.md), define the @@ -125,6 +124,6 @@ For [source installations](../../../administration/pages/source.md), define the [restart GitLab](../../../administration/restart_gitlab.md#installations-from-source): ```shell -export FF_ENABLE_REDIRECTS="true" +export FF_ENABLE_REDIRECTS="false" /path/to/pages/bin/gitlab-pages -config gitlab-pages.conf ``` -- GitLab From 8e7f12233851149190b90dc3c3b0ae3ac1094a4e Mon Sep 17 00:00:00 2001 From: Amy Qualls Date: Wed, 7 Oct 2020 15:01:23 +0000 Subject: [PATCH 2/6] Apply 1 suggestion(s) to 1 file(s) --- doc/user/project/pages/redirects.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md index fd715e41365b84..034aa4d1f03119 100644 --- a/doc/user/project/pages/redirects.md +++ b/doc/user/project/pages/redirects.md @@ -6,8 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Create redirects for GitLab Pages -> - [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24) in GitLab Pages 1.25.0 and GitLab 13.4 behind a feature flag. -> - It's [deployed behind a feature flag](#enable-or-disable-redirects), enabled by default. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24) in GitLab Pages 1.25.0 and GitLab 13.4 behind a feature flag, disabled by default. +> - [Became enabled by default](https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/367) in GitLab 13.5. CAUTION: **Warning:** This feature might not be available to you. Check the **version history** note above for details. -- GitLab From 9c57bf866c6241364fe1a92416f84152cefd10e3 Mon Sep 17 00:00:00 2001 From: Amy Qualls Date: Wed, 7 Oct 2020 15:12:49 +0000 Subject: [PATCH 3/6] Apply 2 suggestion(s) to 2 file(s) --- doc/administration/pages/index.md | 2 +- doc/user/project/pages/redirects.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index aef1461109ba2d..0d4cc39707165a 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -235,7 +235,7 @@ control over how the Pages daemon runs and serves content in your environment. | `pages_path` | The directory on disk where pages are stored, defaults to `GITLAB-RAILS/shared/pages`. | `pages_nginx[]` | | | `enable` | Include a virtual host `server{}` block for Pages inside NGINX. Needed for NGINX to proxy traffic back to the Pages daemon. Set to `false` if the Pages daemon should directly receive all requests, for example, when using [custom domains](index.md#custom-domains). -| `FF_ENABLE_REDIRECTS` | Feature flag to disable redirects (enabled by default). See the [redirects documentation](../../user/project/pages/redirects.md#disable-redirects) for more info. | +| `FF_ENABLE_REDIRECTS` | Feature flag to disable redirects (enabled by default). Read the [redirects documentation](../../user/project/pages/redirects.md#disable-redirects) for more info. | --- diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md index 034aa4d1f03119..601de483e3a6cf 100644 --- a/doc/user/project/pages/redirects.md +++ b/doc/user/project/pages/redirects.md @@ -12,8 +12,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w CAUTION: **Warning:** This feature might not be available to you. Check the **version history** note above for details. -In GitLab Pages, you can [enable](#enable-or-disable-redirects) the redirects feature to configure rules to forward one URL to another using HTTP redirects. GitLab Pages uses -[Netlify style redirects](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file). +In GitLab Pages, you can configure rules to forward one URL to another using +[Netlify style](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file) +HTTP redirects. ## Supported features -- GitLab From 555b815727984d34fefa59463d721016b3672ca0 Mon Sep 17 00:00:00 2001 From: Amy Qualls Date: Wed, 7 Oct 2020 15:24:14 +0000 Subject: [PATCH 4/6] Apply 1 suggestion(s) to 1 file(s) --- doc/user/project/pages/redirects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md index 601de483e3a6cf..1724fad3b92868 100644 --- a/doc/user/project/pages/redirects.md +++ b/doc/user/project/pages/redirects.md @@ -42,7 +42,7 @@ Supported paths must start with a forward slash `/`. ## Create redirects -To create redirects after [enabling](#enable-or-disable-redirects) the feature, +To create redirects, create a configuration file named `_redirects` in the `public/` directory of your GitLab Pages site. -- GitLab From 444dac484af6be666ad30d98b94c19932ca3e127 Mon Sep 17 00:00:00 2001 From: Amy Qualls Date: Wed, 7 Oct 2020 15:58:56 +0000 Subject: [PATCH 5/6] Apply 1 suggestion(s) to 1 file(s) --- doc/user/project/pages/redirects.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md index 1724fad3b92868..0624145cca36db 100644 --- a/doc/user/project/pages/redirects.md +++ b/doc/user/project/pages/redirects.md @@ -107,8 +107,8 @@ rule 11: valid ## Disable redirects -Redirects in GitLab Pages is under development and not ready for production use. It is -deployed behind a feature flag that is **enabled by default**. +Redirects in GitLab Pages is under development, and is deployed behind a feature flag +that is **enabled by default**. To disable redirects, for [Omnibus installations](../../../administration/pages/index.md), define the `FF_ENABLE_REDIRECTS` environment variable in the -- GitLab From 8a158128987249f32c9501d76b55aa5e6aa60e35 Mon Sep 17 00:00:00 2001 From: Amy Qualls Date: Wed, 7 Oct 2020 15:59:04 +0000 Subject: [PATCH 6/6] Apply 1 suggestion(s) to 1 file(s) -- GitLab