HSTS in 9.0.0 not working
After reading through the new features and change log I looked into adding the new HSTS settings into my config file but the reconfigure script doesn't appear to understand these settings as I get the below error when they are enabled.
Starting Chef Client, version 12.12.15
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- package (0.0.0)
- gitlab (0.0.1)
- runit (0.14.2)
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `[]=' for nil:NilClass
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:21:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:
14: # See the License for the specific language governing permissions and
15: # limitations under the License.
16: #
17:
18: Gitlab[:node] = node
19:
20: if File.exists?('/etc/gitlab/gitlab.rb')
21>> Gitlab.from_file('/etc/gitlab/gitlab.rb')
22: end
23:
24: node.consume_attributes(Gitlab.generate_config(node['fqdn']))
25:
Platform:
---------
x86_64-linux
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 01 seconds
My HSTS settings
nginx['hsts']['max_age'] = 15768000
nginx['hsts']['include_subdomains'] = false
I referred to the configuration example at https://docs.gitlab.com/omnibus/settings/nginx.html#setting-http-strict-transport-security.
I've upgraded from 8.17.3 to 9.0.0 on Debian 8, everything else appears to be working as expected.