Giter VIP home page Giter VIP logo

Comments (7)

mattvick avatar mattvick commented on July 23, 2024

@nfriedly I've just noticed the crash is only happening which the proxied page is loaded in an iframe. Do you have any idea why that might be so I can investigate this further?

from node-unblocker.

nfriedly avatar nfriedly commented on July 23, 2024

Hum... that's odd. It definitely shouldn't be crashing, although when I run the proxy locally and visit http://www.optimcore.com/ it works for me. Could you run it again with DEBUG=* npm start and give me the full output? It should include a ton of debugging info.

from node-unblocker.

mattvick avatar mattvick commented on July 23, 2024

Here you go: http://pastebin.com/JLDzX7kX

from node-unblocker.

mattvick avatar mattvick commented on July 23, 2024

FYI I'm building a visual website editor and using the node proxy to circumvent same-origin policy. A PHP app creates an iframe into which a webpage is loaded using the node proxy. The PHP app is running on port 80, the node proxy is running on port 8080 and I'm using Apache to proxy requests to Node.js as follows:

<VirtualHost *:80>
    ServerName ocl
    ServerAlias ocl.com
    DirectoryIndex app.php
    DocumentRoot /Users/matthew/Sites/ocl/web
    <Directory /Users/matthew/Sites/ocl/web>
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>
    <Location "/proxy">
        ProxyPass http://localhost:8080/proxy
        ProxyPassReverse http://localhost:8080/proxy
    </Location>
</VirtualHost>

from node-unblocker.

nfriedly avatar nfriedly commented on July 23, 2024

Hey, sorry it took me forever to get back to you, but I think I finally figured it out. The key is on line 555 of your debug output:

  unblocker:proxy proxying GET http:/www.optimcore.com/js/jquery.min.map +3ms

There should be two slashes after http:, but there's only one. Something is probably trying to be clever and "fix" that for you. I'll see if I can make the proxy a bit more resilient against that kind of shennanagain. At worst, it should just drop the request with a 404, but ideally it should silently fix the URL.

from node-unblocker.

nfriedly avatar nfriedly commented on July 23, 2024

I just released v1.0.10 with a fix to detect "http:/" urls and redirect them to "http://" ones. I know it's been quite a while, but if you get the chance, please try it out and let me know if it works for you.

from node-unblocker.

mattvick avatar mattvick commented on July 23, 2024

This is great, many thanks!

I can't find what was generating the single slash url, perhaps it was a typo that has since been fixed.

Recently I had been investigating another issue: When loading the webpage http://www.survio.com/l-cs-dotaznik-form/ via the proxy. Several resources were randomly returning 5xx errors. The logs were showing a similar domain.split('.') issue:

/var/app/current/node_modules/tld/lib/tld.js:80
    var parts = domain.split('.'),
                      ^

Here are more of the logs: http://pastebin.com/xWwkdWmE

There don't appear to be any malformed (single slash) urls on the survio.com page, but the good news is your new release has also fixed this issue :)

Do you think the cause of this could be something other than the single slash?

Many thanks,
Matthew

from node-unblocker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.