﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
757	map fails to match hostnames values - possibly following proxy_pass	Steeve Knight		"The following map sets up a value for my Access-Control-Allow-Origin

``
map $http_origin  $corsHost  {
    default           '-missed-me-ha-ha-';
    
    hostnames;
    .mastersite.com         $http_origin;

    #this never works
    .minorsite.org          $http_origin;

    #this works fine
    https://minorsite.org   $http_origin;
}
``
Any of whatever.mastersite.com and minorsite.org proxy to mastersite.com via proxy_pass.
whatever.mastersite.com and minorsite.org then may make requests (usualy async) directly to mastersite.com.
whatever.mastersite.com Requests to mastersite.com work just fine and $corsHost is set properly
minorsite.org Requests to mastersite.com always fail and $corsHost is set to default.
Workaround is as above, avoiding the hostname combo and using the full request Origin string."	defect	closed	minor		nginx-module	1.7.x	invalid	map		Linux <drop-name> 3.16.0-28-generic #37-Ubuntu SMP Mon Dec 8 17:15:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux	0.91-ubuntu1
