Set CustomHeader via Variable

Hi, I am trying to set the Access-Control-Allow-Origin in CustomHeaders with Variables.
The connectionstrings and appsettings are working perfectly - it is currently not being updated when I use “Access-Control-Allow-Origin” variable.

	<httpProtocol>
		<customHeaders>
			<add name="Access-Control-Allow-Origin" value="http://mycustomsite.com" />
		</customHeaders>
	</httpProtocol>

Hi @jxharding,

Thanks for getting in touch! The method of transforming the variables here is only applicable to the connectionStrings, appSettings, and applicationSettings elements. For anything else, such as your Access-Control-Allow-Origin variable, you will need to use the Octopus syntax and the Substitute Variables in Files feature.

We have a documentation page with a lot more details on working with XML configuration variables.

Let me know if you have any further questions here or run into any issues. :slight_smile:

Best regards,
Daniel

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.