Unable to secure 'latest' url param in Atlassian plugin


I am developing simple REST plugin in which I have exposed endpoints having /rest/dws/1.0 in the path. Following are the code snippet in atlassian-plugin.xml

<servlet-filter name="Rest Authorisation Filter" key="restAuthorisationFilter" class="com.example.dws.atlassian.plugin.filter.RestAuthorisationFilter" weight="200">
    <description>Validates user authorisation to access REST resource</description>

As in guide, version control for API section has ‘latest’ keyword used.

With above atlassian-plugin.xml configuration, I am unable to secure my REST if someone uses /bitbucket/rest/dws/latest instead /bitbucket/rest/dws/1.0

Could you please guide me to secure both endpoints?