Sha256: c00ac1be73f028f5730f2b9376e2f901481ed635c1e4af4d34244cff71ababd1

Contents?: true

Size: 1.99 KB

Versions: 2

Compression:

Stored size: 1.99 KB

Contents

class Fastly
  # customize headers. Best used with conditions.
  class Header < BelongsToServiceAndVersion
    attr_accessor :service_id, :name, :action, :cache_condition, :request_condition, :response_condition, :ignore_if_set, :type, :dst, :src, :substitution, :priority, :regexp

        ##
        # :attr: service_id
        #
        # The id of the service this belongs to.

        ##
        # :attr: version
        #
        # The number of the version this belongs to.

        ##
        # :attr: name
        #
        # The name of the header setting

	##
	# :attr: action
	#
	# Action to perform on the header. Can be:
	# - 'set' - Sets (or resets) a header
	# - 'append' - Appends to an existing header
	# - 'delete' - Delete a header
	# - 'regex' - Perform a single regex replacement on a header
	# - 'regex_repeat' - Perform a global regex replacement on a header

	##
	# :attr: ignore_if_set
	#
	# Don't add the header if it is already set. Only applies to the 'set'
	# action

	##
	# :attr: type
	#
	#  - 'request' - Performs on the request before lookup occurs
        # - 'fetch' - Performs on the request to the origin server
        # - 'cache' - Performs on the response before it's stored in the cache
        # - 'response' - Performs on the response before delivering to the client

	##
	# :attr: dst
	#
	# Header to set

	##
	# :attr: src
	#
	# Variable to be used as a source for the header content. Does not apply
	# to the 'delete' action.

	##
	# :attr: regexp
	#
	# Regular expression to use with the 'regex' and 'regex_repeat' actions.

	##
	# :attr: substitution
	#
	# Value to substitute in place of regular expression. (Only applies to
	# 'regex' and 'regex_repeat'.)

	##
	# :attr: priority
	#
	# Lower priorities execute first.

	##
	# :attr: request_condition
	#
	# Optional name of a request condition to apply

	##
	# :attr: cache_condition
	#
	# Optional name of a cache condition to apply

	##
	# :attr: response_condition
	#
	# Optional name of a response condition to apply

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fastly-1.1.4 lib/fastly/header.rb
fastly-1.1.3 lib/fastly/header.rb