<div dir="ltr">Yes, it comes from my browser, but I don't think it's normal, because I didn't see it before in my mojolicious application.<div>Anyway, I think, there is the way to tweak an environment of the dev server. Am I right? ;-)</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-05 1:41 GMT+06:00 Trevor Leffler <span dir="ltr"><<a href="mailto:tleffler@uw.edu" target="_blank">tleffler@uw.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
tl;dr - Use c.uri_for() everything, including statics.<br>
<br>
I can't say why your links are <a href="http://0.0.0.0/image.png" target="_blank">0.0.0.0/image.png</a> without looking at the full source of your page. I think your browser is doing this, maybe with some (bad) hints.<br>
<br>
However... c.uri_for('/image.png') is the right way to do it. It will make sure the correct hostname, port, and path prefix for your application are used, and it makes your app relocatable -- meaning you won't have to change all of your static urls when your app's URL or root path changes.<br>
<br>
This is a typical use:<br>
<br>
<link href="[% c.uri_for('/static/css/my_<u></u>style.css') | html %]" rel="stylesheet"><br>
<br>
Cheers,<br>
--Trevor<span class=""><br>
<br>
On 12/04/2014 11:23 AM, Александер Пономарёв wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hello to all,<br>
I'm very beginner in Catalyst and now I've faced up with the problem: on<br></span>
my dev sever (script/<a href="http://myapp_server.pl" target="_blank">myapp_server.pl</a> <<a href="http://myapp_server.pl" target="_blank">http://myapp_server.pl</a>>) I've got<span class=""><br>
urls to static files like, for example <a href="http://0.0.0.0/image.png" target="_blank">0.0.0.0/image.png</a><br></span>
<<a href="http://0.0.0.0/image.png" target="_blank">http://0.0.0.0/image.png</a>>, instead of localhost:3000/image.png. (in<span class=""><br>
template it looks like <img src="/image.png" /><br>
So, I can't load any static file in my dev-server. Please, help me to<br>
figure out what's going.<br>
And yes, uri_for('/image.png') works fine, but, may be, there is another<br>
way to do it?<br>
<br>
Thanks for youre help.<br>
<br>
<br></span>
______________________________<u></u>_________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-<u></u>bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/<u></u>catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-<u></u>bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/<u></u>catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</blockquote></div><br></div>