         deny                  all;
 """
 
-createWebLocation = ({name, locationConf}) ->
+createWebLocation = ({name, locationConf, cors}) ->
   { location, proxyPass, internalOnly, auth, extraParams } = locationConf
     # 3 tabs are just for style
   extraParamsStr = extraParams?.join("\n\t\t\t") or ""
   host = locationConf.host or "$host"
+
   return """\n
       location #{location} {
         proxy_pass            #{proxyPass};

fs                     = require 'fs'
{ isAllowed, isProxy } = require './grouptoenvmapping'

createUpstreams = (KONFIG) ->


        # proxy should connect in 1 second
        proxy_connect_timeout 1;

        #{if cors then cors else ''}
        #{if internalOnly then allowInternal else ''}
        #{if auth then basicAuth else ''}
        #{extraParamsStr}
