0
votes

I am trying to add a mime typo to IIS using the code

powershell_script 'addwoff2mimetoIIS' do
  guard_interpreter :powershell_script
  code 'Add-webconfigurationproperty //staticContent -name collection -value @{fileExtension=".woff"; mimeType="application/font-woff2"}'
  action :run
  not_if '(Get-WebConfiguration //staticContent).collection | ? {$_.fileExtention -eq ".woff2"}'
end

It just doesn't seem to work, In the chef run it is not even being shown.

Any ideas ?

Regards,

1

1 Answers

0
votes

Apologies for jumping the gun so early, fixed it

powershell_script 'addwoff2mimetoIIS' do
  guard_interpreter :powershell_script
  code 'Add-webconfigurationproperty //staticContent -name collection -value @{fileExtension=".woff2"; mimeType="application/font-woff2"}'
  action :run
  not_if '(((Get-WebConfiguration //staticContent).collection | ? {$_.fileExtension -eq ".woff2"}).fileExtension).length -gt 0'
end

Working