message: Hotfix: Check if env variables exist before using them
diff: header_filter_by_lua_block {
  -- escape characters in the hostname
  host = string.gsub(ngx.var.host, "%p", "%%%1")
  +
  -- check to see if we are a development environment
  - if string.match (os.getenv("LAGOON_ENVIRONMENT_TYPE"), 'development') then
  + if (os.getenv("LAGOON_ENVIRONMENT_TYPE") and string.match(os.getenv("LAGOON_ENVIRONMENT_TYPE"), 'development')) then
  ngx.header["X-Robots-Tag"] = 'noindex, nofollow';
  + end
  +
  -- check hostname against autogenerated routes
  - elseif string.match (os.getenv("LAGOON_AUTOGENERATED_ROUTES"),host) then
  + if (os.getenv("LAGOON_AUTOGENERATED_ROUTES") and string.match(os.getenv("LAGOON_AUTOGENERATED_ROUTES"), host)) then
  ngx.header["X-Robots-Tag"] = 'noindex, nofollow';
  end
  }
  