Restrict specific url

Hello,
I have this situation:
There is NAS in my local network which is accessible from WAN thanks to NAT rule. I am generating unique URL’s for sharing files of my NAS.
Example: http://xx.xx.xx.xx:8080/share.cgi?ssid=0Wp47fx.
The problem is that NAS authorization page also is accessible from WAN which is http://xx.xx.xx.xx:8080/cgi-bin/. As you see, both links are on same port. There is no way in NAS configuration to run authorization page on separated port.
So my question is following: is there way to block exacly http://xx.xx.xx.xx:8080/cgi-bin/ from WAN and leave accessible all other connections to port 8080?