Note that there are some explanatory texts on larger screens.

plurals
  1. PONode.js express routes aren't catching some GETS even with wildcard
    text
    copied!<p>I'm making a web app that runs on a node express webserver. I have the routes currently setup like this:</p> <pre><code>app.all('*', function(req, res){ var url = req.originalUrl; if(url == '/'){ res.render('index.html'); } else { console.log("**USING * HANDLER"); var string = url.substr(1, url.length); res.render(string); } }); </code></pre> <p>I have it setup that way cause it takes care of at least 15 links from the <code>index.html</code> file in one pass.</p> <p>Now below that, I also have: </p> <pre><code>app.get('/proxy*', function (req, res) { console.log('**USING /proxy HANDLER'); //return proxy.proxyRequest(req, res, proxyOptions); }); </code></pre> <p>That's because my server makes some requests like: </p> <p><code>GET /proxy.php?url=http%3A%2F%2Fa.tile.cloudmade.com%2FBC9A493B41014CAABB98F0471D759707%2F997%2F256%2F0%2F0%2F0.png</code></p> <p>I need those requests to be handled separately. The problem is it seems like a lot of stuff gets by without any printing. Here's a list of some of the GETS:</p> <pre><code>**USING * HANDLER GET / 304 8ms **USING * HANDLER GET /leaflet.html 304 5ms GET /leaflet/dist/leaflet.js 304 1ms GET /js/jquery/jquery-1.4.2.js 304 1ms GET /js/osgjs/osg-debug-0.0.7.js 304 2ms GET /js/osgjs/osg-extras.js 304 3ms GET /js/osgearth/FunctionLocation.js 304 3ms GET /js/osgearth/osgearth.js 304 4ms GET /js/osgearth/ShaderFactory.js 304 2ms GET /js/osgearth/VirtualProgram.js 304 1ms GET /js/osgearth/Extent.js 304 2ms GET /js/osgearth/EllipsoidModel.js 304 1ms GET /js/osgearth/Profile.js 304 2ms GET /js/osgearth/GeodeticProfile.js 304 2ms GET /js/osgearth/MercatorProfile.js 304 3ms GET /js/osgearth/TileKey.js 304 3ms GET /js/osgearth/ImageLayer.js 304 2ms GET /js/osgearth/HeightField.js 304 2ms GET /js/osgearth/ElevationLayer.js 304 3ms </code></pre> <p>And that's it. It prints <code>USING * HANDLER</code> for the GETS I actually manually make myself. So when I go to the server URL for <code>/</code>, and when I then click on the link for <code>leaflet.html</code> After that, all the GETS made by the server return successfully but it never prints. It also never prints for the proxy route. What gives? And how do I fix this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload