<div dir="ltr">Yes, it comes from my browser, but I don&#39;t think it&#39;s normal, because I didn&#39;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">&lt;<a href="mailto:tleffler@uw.edu" target="_blank">tleffler@uw.edu</a>&gt;</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&#39;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(&#39;/image.png&#39;) 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&#39;t have to change all of your static urls when your app&#39;s URL or root path changes.<br>
<br>
This is a typical use:<br>
<br>
&lt;link href=&quot;[% c.uri_for(&#39;/static/css/my_<u></u>style.css&#39;) | html %]&quot; rel=&quot;stylesheet&quot;&gt;<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&#39;m very beginner in Catalyst and now I&#39;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> &lt;<a href="http://myapp_server.pl" target="_blank">http://myapp_server.pl</a>&gt;) I&#39;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>
&lt;<a href="http://0.0.0.0/image.png" target="_blank">http://0.0.0.0/image.png</a>&gt;, instead of localhost:3000/image.png. (in<span class=""><br>
template it looks like &lt;img src=&quot;/image.png&quot; /&gt;<br>
So, I can&#39;t load any static file in my dev-server. Please, help me to<br>
figure out what&#39;s going.<br>
And yes, uri_for(&#39;/image.png&#39;) 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>