cactus / go-camo

A secure image proxy server
MIT License
255 stars 48 forks source link

Optimize allowList matching #10

Closed jdreesen closed 9 years ago

jdreesen commented 9 years ago

If allowList is empty, theres no need to check matchFound because it's always true. Also, if a match was found, theres no need to check the remaining entries.

jdreesen commented 9 years ago

You are right, much nicer this way! I don't know why I didn't do it directly.

=> changed and force-pushed

dropwhile commented 9 years ago

thanks!