Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
做这样的事情会很好
header('Access-Control-Allow-Origin: http://example.com/subdir');
它似乎没有工作。
可以做到吗?如果是这样,如何?
目标是只允许使用subdir.
subdir
根据RFC (6454)判断,您似乎无法以这种方式定义 Allow Origin。您可以定义子域,但不能定义子目录