Bruce,
NetWebServer._CreateHeader() has a couple of errors:
if p_HeaderDetails.AccessControlAllowOrigin <> ''
HeaderStr.Append('Access-Control-Allow-Origin ' & clip (p_HeaderDetails.AccessControlAllowOrigin) & '<13,10>')
end
if p_HeaderDetails.AccessControlAllowCredentials <> ''
HeaderStr.Append('Access-Control-Allow-Credentials ' & clip (p_HeaderDetails.AccessControlAllowCredentials) & '<13,10>')
end
if p_HeaderDetails.AccessControlAllowOrigin <> ''
HeaderStr.Append('Access-Control-Allow-Methods ' & clip (p_HeaderDetails.AccessControlAllowMethods) & '<13,10>')
end
if p_HeaderDetails.AccessControlMaxAge <> ''
HeaderStr.Append('Access-Control-Allow-MaxAge ' & clip (p_HeaderDetails.AccessControlMaxAge) & '<13,10>')
end
Should be:
if p_HeaderDetails.AccessControlAllowOrigin <> ''
HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Origin: ' & clip (p_HeaderDetails.AccessControlAllowOrigin) & '<13,10>'
end
if p_HeaderDetails.AccessControlAllowCredentials <> ''
HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Credentials: ' & clip (p_HeaderDetails.AccessControlAllowCredentials) & '<13,10>'
end
if p_HeaderDetails.AccessControlAllowMethods <> ''
HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-Methods: ' & clip (p_HeaderDetails.AccessControlAllowMethods) & '<13,10>'
end
if p_HeaderDetails.AccessControlMaxAge <> ''
HeaderStr = clip (HeaderStr) & 'Access-Control-Allow-MaxAge: ' & clip (p_HeaderDetails.AccessControlMaxAge) & '<13,10>'
end
There are missing colons and the condition on the allow methods are changed.
Thanks,
Larry Sand