Atleast 2 ways to accomplish label filtering, meaning appending label to prefix. Outbound filtering and Inbound filtering.
Configs:
Outbound Filtering
no mpls ldp advertise-labels
mpls ldp advertise-labels for 51 to 50
Access List 51 is ACL for the prefixes and ACL 50 is the ACL for the LDP neighbor
Inbound Filtering
mpls ldp neighbor 1.1.1.1 labels accept 99
Access List 99 is the ACL for the prefixes