huacnlee / rucaptcha

Captcha Gem for Rails, which generates captcha image by Rust.
https://huacnlee.github.io/rucaptcha
MIT License
693 stars 133 forks source link

edge case in src of rucaptcha_image_tag #81

Open sherllochen opened 5 years ago

sherllochen commented 5 years ago

In development env. rucaptcha_image_tag will render

<img alt="Rucaptcha" class="rucaptcha-image" src="http://127.0.01:3000/rucaptcha/">

The src attribute include host info. It's ok in local machine.

Edge case: in a remote server, just run with development env and bind local address. use Nginx to listen to 80 and forward request.

rails server -b 0.0.0.0 

In this case, the absolute path of Rucaptcha tag with not working.

Whether using the relative path of image would be better?

<img alt="Rucaptcha" class="rucaptcha-image" src="/rucaptcha/">