Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/project/pages')
-rw-r--r--doc/user/project/pages/custom_domains_ssl_tls_certification/dns_concepts.md4
-rw-r--r--doc/user/project/pages/custom_domains_ssl_tls_certification/index.md10
-rw-r--r--doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md3
-rw-r--r--doc/user/project/pages/getting_started/new_or_existing_website.md2
-rw-r--r--doc/user/project/pages/getting_started/pages_forked_sample_project.md2
-rw-r--r--doc/user/project/pages/getting_started_part_one.md9
-rw-r--r--doc/user/project/pages/getting_started_part_three.md4
-rw-r--r--doc/user/project/pages/index.md21
-rw-r--r--doc/user/project/pages/introduction.md11
-rw-r--r--doc/user/project/pages/lets_encrypt_for_gitlab_pages.md5
-rw-r--r--doc/user/project/pages/pages_access_control.md17
-rw-r--r--doc/user/project/pages/redirects.md36
12 files changed, 73 insertions, 51 deletions
diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/dns_concepts.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/dns_concepts.md
index 735d27ec04d..810538ab460 100644
--- a/doc/user/project/pages/custom_domains_ssl_tls_certification/dns_concepts.md
+++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/dns_concepts.md
@@ -30,6 +30,8 @@ to do it for you.
To help you out, we've gathered some instructions on how to do that
for the most popular hosting services:
+<!-- vale gitlab.Spelling = NO -->
+
- [Amazon](https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html)
- [Bluehost](https://www.bluehost.com/help/article/dns-management-add-edit-or-delete-dns-entries)
- [Cloudflare](https://support.cloudflare.com/hc/en-us/articles/201720164-Creating-a-Cloudflare-account-and-adding-a-website)
@@ -41,6 +43,8 @@ for the most popular hosting services:
- [Media Temple](https://mediatemple.net/community/products/dv/204403794/how-can-i-change-the-dns-records-for-my-domain)
- [Microsoft](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/bb727018(v=technet.10))
+<!-- vale gitlab.Spelling = YES -->
+
If your hosting service is not listed above, you can just try to
search the web for `how to add dns record on <my hosting service>`.
diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md
index badafa478ef..9b43dd58afe 100644
--- a/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md
+++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md
@@ -61,7 +61,6 @@ according to the type of domain you want to use with your Pages site:
- [For subdomains](#for-subdomains), `subdomain.example.com`.
- [For both](#for-both-root-and-subdomains).
-NOTE: **Note:**
You can [configure IPv6 on self-managed instances](../../../../administration/pages/index.md#advanced-configuration),
but IPv6 is not currently configured for Pages on GitLab.com.
Follow [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/214718) for details.
@@ -250,8 +249,8 @@ You can use any certificate satisfying the following requirements:
- **A private key**, it's an encrypted key which validates
your PEM against your domain.
-NOTE: **Note:**
-[Cloudflare certificates](https://about.gitlab.com/blog/2017/02/07/setting-up-gitlab-pages-with-cloudflare-certificates/), for example, meet these requirements.
+For example, [Cloudflare certificates](https://about.gitlab.com/blog/2017/02/07/setting-up-gitlab-pages-with-cloudflare-certificates/)
+meet these requirements.
#### Steps
@@ -269,7 +268,6 @@ NOTE: **Note:**
just jumping a line between them.
1. Copy your private key and paste it in the last field.
-NOTE: **Note:**
**Do not** open certificates or encryption keys in
regular text editors. Always use code editors (such as
Sublime Text, Atom, Dreamweaver, Brackets, etc).
@@ -290,8 +288,8 @@ To enable this setting:
1. Navigate to your project's **Settings > Pages**.
1. Tick the checkbox **Force HTTPS (requires valid certificates)**.
-NOTE: **Note:**
-If you use Cloudflare CDN in front of GitLab Pages, make sure to set the SSL connection setting to `full` instead of `flexible`. For more details, see the [Cloudflare CDN directions](https://support.cloudflare.com/hc/en-us/articles/200170416-End-to-end-HTTPS-with-Cloudflare-Part-3-SSL-options#h_4e0d1a7c-eb71-4204-9e22-9d3ef9ef7fef).
+If you use Cloudflare CDN in front of GitLab Pages, make sure to set the SSL connection setting to
+`full` instead of `flexible`. For more details, see the [Cloudflare CDN directions](https://support.cloudflare.com/hc/en-us/articles/200170416-End-to-end-HTTPS-with-Cloudflare-Part-3-SSL-options#h_4e0d1a7c-eb71-4204-9e22-9d3ef9ef7fef).
<!-- ## Troubleshooting
diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md
index 4b4b430b663..24b202dfdbd 100644
--- a/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md
+++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md
@@ -25,7 +25,7 @@ This feature covers only certificates for **custom domains**, not the wildcard c
Before you can enable automatic provisioning of an SSL certificate for your domain, make sure you have:
-- Created a [project](../getting_started_part_two.md) in GitLab
+- Created a [project](../index.md#getting-started) in GitLab
containing your website's source code.
- Acquired a domain (`example.com`) and added a [DNS entry](index.md)
pointing it to your Pages website.
@@ -33,7 +33,6 @@ Before you can enable automatic provisioning of an SSL certificate for your doma
and verified your ownership.
- Verified your website is up and running, accessible through your custom domain.
-NOTE: **Note:**
GitLab's Let's Encrypt integration is enabled and available on GitLab.com.
For **self-managed** GitLab instances, make sure your administrator has
[enabled it](../../../../administration/pages/index.md#lets-encrypt-integration).
diff --git a/doc/user/project/pages/getting_started/new_or_existing_website.md b/doc/user/project/pages/getting_started/new_or_existing_website.md
index 86f36447b93..f19334a1764 100644
--- a/doc/user/project/pages/getting_started/new_or_existing_website.md
+++ b/doc/user/project/pages/getting_started/new_or_existing_website.md
@@ -2,4 +2,4 @@
redirect_to: 'pages_ci_cd_template.md'
---
-This document was moved to [pages_ci_cd_template.md](pages_ci_cd_template.md).
+This document was moved to [another location](pages_ci_cd_template.md).
diff --git a/doc/user/project/pages/getting_started/pages_forked_sample_project.md b/doc/user/project/pages/getting_started/pages_forked_sample_project.md
index de9bd97b262..7dc3d2197b5 100644
--- a/doc/user/project/pages/getting_started/pages_forked_sample_project.md
+++ b/doc/user/project/pages/getting_started/pages_forked_sample_project.md
@@ -53,4 +53,4 @@ You can take some **optional** further steps:
![Change repo's path](../img/change_path_v12_10.png)
- Now go to your SSG's configuration file and change the [base URL](../getting_started_part_one.md#urls-and-baseurls)
- from `"project-name"` to `""`. The project name setting varies by SSG and may not be in the config file.
+ from `"project-name"` to `""`. The project name setting varies by SSG and may not be in the configuration file.
diff --git a/doc/user/project/pages/getting_started_part_one.md b/doc/user/project/pages/getting_started_part_one.md
index 9272b1f9093..5ef0c4cc7b9 100644
--- a/doc/user/project/pages/getting_started_part_one.md
+++ b/doc/user/project/pages/getting_started_part_one.md
@@ -11,12 +11,9 @@ according to your intended website's URL.
## GitLab Pages default domain names
-NOTE: **Note:**
-If you use your own GitLab instance to deploy your
-site with GitLab Pages, check with your sysadmin what's your
-Pages wildcard domain. This guide is valid for any GitLab instance,
-you just need to replace Pages wildcard domain on GitLab.com
-(`*.gitlab.io`) with your own.
+If you use your own GitLab instance to deploy your site with GitLab Pages, verify your Pages
+wildcard domain with your sysadmin. This guide is valid for any GitLab instance, provided that you
+replace the Pages wildcard domain on GitLab.com (`*.gitlab.io`) with your own.
If you set up a GitLab Pages project on GitLab,
it will automatically be accessible under a
diff --git a/doc/user/project/pages/getting_started_part_three.md b/doc/user/project/pages/getting_started_part_three.md
index 9bc9fe97fd3..4bf5300aa13 100644
--- a/doc/user/project/pages/getting_started_part_three.md
+++ b/doc/user/project/pages/getting_started_part_three.md
@@ -1 +1,5 @@
+---
+redirect_to: 'custom_domains_ssl_tls_certification/index.md'
+---
+
This document was moved to [another location](custom_domains_ssl_tls_certification/index.md).
diff --git a/doc/user/project/pages/index.md b/doc/user/project/pages/index.md
index 6c3b911d033..4f389716f08 100644
--- a/doc/user/project/pages/index.md
+++ b/doc/user/project/pages/index.md
@@ -124,3 +124,24 @@ If you are running a self-managed instance of GitLab (GitLab Community Edition a
[follow the administration steps](../../../administration/pages/index.md) to configure Pages.
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> Watch a [video tutorial](https://www.youtube.com/watch?v=dD8c7WNcc6s) about how to get started with GitLab Pages administration.
+
+## Security for GitLab Pages
+
+If your username is `foo`, your GitLab Pages website is located at `foo.gitlab.io`.
+GitLab allows usernames to contain a `.`, so a user named `bar.foo` could create
+a GitLab Pages website `bar.foo.gitlab.io` that effectively is a subdomain of your
+`foo.gitlab.io` website. Be careful if you use JavaScript to set cookies for your website.
+The safe way to manually set cookies with JavaScript is to not specify the `domain` at all:
+
+```javascript
+// Safe: This cookie is only visible to foo.gitlab.io
+document.cookie = "key=value";
+
+// Unsafe: This cookie is visible to foo.gitlab.io and its subdomains,
+// regardless of the presence of the leading dot.
+document.cookie = "key=value;domain=.foo.gitlab.io";
+document.cookie = "key=value;domain=foo.gitlab.io";
+```
+
+This issue doesn't affect users with a custom domain, or users who don't set any
+cookies manually with JavaScript.
diff --git a/doc/user/project/pages/introduction.md b/doc/user/project/pages/introduction.md
index cea6bab1a50..b97d5328c07 100644
--- a/doc/user/project/pages/introduction.md
+++ b/doc/user/project/pages/introduction.md
@@ -173,7 +173,7 @@ Most modern browsers support downloading files in a compressed format. This
speeds up downloads by reducing the size of files.
Before serving an uncompressed file, Pages will check whether the same file
-exists with a `.gz` extension. If it does, and the browser supports receiving
+exists with a `.br` or `.gz` extension. If it does, and the browser supports receiving
compressed files, it will serve that version instead of the uncompressed one.
To take advantage of this feature, the artifact you upload to the Pages should
@@ -182,14 +182,17 @@ have this structure:
```plaintext
public/
├─┬ index.html
+│ | index.html.br
│ └ index.html.gz
├── css/
│ └─┬ main.css
+│ | main.css.br
│ └ main.css.gz
└── js/
└─┬ main.js
+ | main.js.br
└ main.js.gz
```
@@ -202,6 +205,7 @@ pages:
script:
# Build the public/ directory first
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
+ - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec brotli -f -k {} \;
```
By pre-compressing the files and including both versions in the artifact, Pages
@@ -255,9 +259,8 @@ instead. Here are some examples of what will happen given the above Pages site:
| `/other/index` | `200 OK` | `public/other/index.html` |
| `/other/index.html` | `200 OK` | `public/other/index.html` |
-NOTE: **Note:**
-When `public/data/index.html` exists, it takes priority over the `public/data.html`
-file for both the `/data` and `/data/` URL paths.
+Note that when `public/data/index.html` exists, it takes priority over the `public/data.html` file
+for both the `/data` and `/data/` URL paths.
## Frequently Asked Questions
diff --git a/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md b/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md
index 708d886b352..02d1dd7898a 100644
--- a/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md
+++ b/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md
@@ -33,9 +33,8 @@ To follow along with this tutorial, we assume you already have:
Once you have the requirements addressed, follow the instructions
below to learn how to obtain the certificate.
-NOTE: **Note:**
-The instructions below were tested on macOS Mojave. For other
-operating systems the steps might be slightly different. Follow the
+Note that these instructions were tested on macOS Mojave. For other operating systems the steps
+might be slightly different. Follow the
[CertBot instructions](https://certbot.eff.org/) according to your OS.
1. On your computer, open a terminal and navigate to your repository's
diff --git a/doc/user/project/pages/pages_access_control.md b/doc/user/project/pages/pages_access_control.md
index b6b881b961e..b3705a5835a 100644
--- a/doc/user/project/pages/pages_access_control.md
+++ b/doc/user/project/pages/pages_access_control.md
@@ -20,11 +20,9 @@ on your GitLab instance. When enabled, only
For a demonstration, see [Pages access controls](https://www.youtube.com/watch?v=tSPAr5mQYc8).
1. Navigate to your project's **Settings > General** and expand **Visibility, project features, permissions**.
-1. Toggle the **Pages** button to enable the access control.
- NOTE: **Note:**
- If you don't see the toggle button, that means that it's not enabled.
- Ask your administrator to [enable it](../../../administration/pages/index.md#access-control).
+1. Toggle the **Pages** button to enable the access control. If you don't see the toggle button,
+ that means it isn't enabled. Ask your administrator to [enable it](../../../administration/pages/index.md#access-control).
1. The Pages access control dropdown allows you to set who can view pages hosted
with GitLab Pages, depending on your project's visibility:
@@ -48,9 +46,10 @@ can access the website.
## Terminating a Pages session
-If you want to log out from your Pages website,
-you can do so by revoking application access token for GitLab Pages:
+To sign out of your GitLab Pages website, revoke the application access token
+for GitLab Pages:
-1. Navigate to your profile's **Settings > Applications**.
-1. Find **Authorized applications** at the bottom of the page.
-1. Find **GitLab Pages** and press the **Revoke** button.
+1. In the top menu, select your profile, and then select **Settings**.
+1. In the left sidebar, select **Applications**.
+1. Scroll to the **Authorized applications** section, find the **GitLab Pages**
+ entry, and select its **Revoke** button.
diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md
index ae7b1b4fa6e..60fbf368061 100644
--- a/doc/user/project/pages/redirects.md
+++ b/doc/user/project/pages/redirects.md
@@ -6,15 +6,15 @@ 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, 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.
-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
@@ -22,8 +22,10 @@ GitLab Pages only supports the
[`_redirects` plain text file syntax](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file),
and `.toml` files are not supported.
-Redirects are only supported at a basic level, and GitLab Pages doesn't support all
-[special options offered by Netlify](https://docs.netlify.com/routing/redirects/redirect-options/):
+Redirects are only supported at a basic level. GitLab Pages doesn't support all
+[special options offered by Netlify](https://docs.netlify.com/routing/redirects/redirect-options/).
+
+Note that supported paths must start with a forward slash `/`.
| Feature | Supported | Example |
| ------- | --------- | ------- |
@@ -37,12 +39,9 @@ Redirects are only supported at a basic level, and GitLab Pages doesn't support
| Redirect by country or language | **{dotted-circle}** No | `/ /anz 302 Country=au,nz` |
| Redirect by role | **{dotted-circle}** No | `/admin/* 200! Role=admin` |
-NOTE: **Note:**
-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.
@@ -78,8 +77,7 @@ is ignored because `hello.html` exists:
/projectname/hello.html /projectname/world.html 302
```
-NOTE: **Note:**
-GitLab does not support Netlify's
+GitLab doesn't support Netlify's
[force option](https://docs.netlify.com/routing/redirects/rewrites-proxies/#shadowing)
to change this behavior.
@@ -105,19 +103,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**.
+Redirects in GitLab Pages is under development, and is 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 +123,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
```