Hello!
On Tue, Apr 9, 2013 at 7:23 PM, Daoyu Zhuang wrote:
> in https page, there may be image serve in http, and browser will show some
> alert. We want to:
>
> 1. replace the img src="http://xx/a.jpg to img src="//xx/a.jpg
> 2. log the request url if replacement happens
>
> Task 1 is perfectly done with replace-filter-nginx-module. Is there any way
> to tell whether there's a replacement? Or I have to filter the response
> twice, 1st for log, 2nd for replacement?
>
I can expose an Nginx variable, say, $replace_filter_subs, to keep
track of the number of substitutions already performed in the current
request body. Does it meet your needs?
> I'll look into the src, but appreciate you can help.
>
Yeah, I'd love to help :) And patches welcome ;)
> (to log the request url, we may edit the CMS database, change the http to
> //)
>
I don't quite follow your logging thing. What is your CMS database?
MySQL? How will you "edit" your CMS database?
BTW, I'm cc'ing the openresty-en mailing list:
https://groups.google.com/group/openresty-en And you're highly
recommended to post to the list instead of emailing me directly for
such questions :)
Best regards,
-agentzh