Commit 70cfc82d authored by Krasimir Angelov's avatar Krasimir Angelov

Rename .gitlab_pages_shared_secret to .gitlab_pages_secret

to match the file generated by Omnibus.

See https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/3705
parent 5fad8112
...@@ -66,7 +66,7 @@ eslint-report.html ...@@ -66,7 +66,7 @@ eslint-report.html
/vendor/gitaly-ruby /vendor/gitaly-ruby
/builds* /builds*
/.gitlab_workhorse_secret /.gitlab_workhorse_secret
/.gitlab_pages_shared_secret /.gitlab_pages_secret
/webpack-report/ /webpack-report/
/knapsack/ /knapsack/
/rspec_flaky/ /rspec_flaky/
......
...@@ -321,8 +321,8 @@ production: &base ...@@ -321,8 +321,8 @@ production: &base
# external_https: ["1.1.1.1:443", "[2001::1]:443"] # If defined, enables custom domain and certificate support in GitLab Pages # external_https: ["1.1.1.1:443", "[2001::1]:443"] # If defined, enables custom domain and certificate support in GitLab Pages
# File that contains the shared secret key for verifying access for gitlab-pages. # File that contains the shared secret key for verifying access for gitlab-pages.
# Default is '.gitlab_pages_shared_secret' relative to Rails.root (i.e. root of the GitLab app). # Default is '.gitlab_pages_secret' relative to Rails.root (i.e. root of the GitLab app).
# secret_file: /home/git/gitlab/.gitlab_pages_shared_secret # secret_file: /home/git/gitlab/.gitlab_pages_secret
## Mattermost ## Mattermost
## For enabling Add to Mattermost button ## For enabling Add to Mattermost button
......
...@@ -291,7 +291,7 @@ Settings.pages['url'] ||= Settings.__send__(:build_pages_url) ...@@ -291,7 +291,7 @@ Settings.pages['url'] ||= Settings.__send__(:build_pages_url)
Settings.pages['external_http'] ||= false unless Settings.pages['external_http'].present? Settings.pages['external_http'] ||= false unless Settings.pages['external_http'].present?
Settings.pages['external_https'] ||= false unless Settings.pages['external_https'].present? Settings.pages['external_https'] ||= false unless Settings.pages['external_https'].present?
Settings.pages['artifacts_server'] ||= Settings.pages['enabled'] if Settings.pages['artifacts_server'].nil? Settings.pages['artifacts_server'] ||= Settings.pages['enabled'] if Settings.pages['artifacts_server'].nil?
Settings.pages['secret_file'] ||= Rails.root.join('.gitlab_pages_shared_secret') Settings.pages['secret_file'] ||= Rails.root.join('.gitlab_pages_secret')
# #
# Geo # Geo
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::Pages do describe Gitlab::Pages do
let(:pages_shared_secret) { SecureRandom.random_bytes(Gitlab::Pages::SECRET_LENGTH) } let(:pages_secret) { SecureRandom.random_bytes(Gitlab::Pages::SECRET_LENGTH) }
before do before do
allow(described_class).to receive(:secret).and_return(pages_shared_secret) allow(described_class).to receive(:secret).and_return(pages_secret)
end end
describe '.verify_api_request' do describe '.verify_api_request' do
......
...@@ -4,10 +4,10 @@ require 'spec_helper' ...@@ -4,10 +4,10 @@ require 'spec_helper'
describe API::Internal::Pages do describe API::Internal::Pages do
describe "GET /internal/pages" do describe "GET /internal/pages" do
let(:pages_shared_secret) { SecureRandom.random_bytes(Gitlab::Pages::SECRET_LENGTH) } let(:pages_secret) { SecureRandom.random_bytes(Gitlab::Pages::SECRET_LENGTH) }
before do before do
allow(Gitlab::Pages).to receive(:secret).and_return(pages_shared_secret) allow(Gitlab::Pages).to receive(:secret).and_return(pages_secret)
end end
def query_host(host, headers = {}) def query_host(host, headers = {})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment