Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unauthorized When Sending Production Origin Header #9

Open
pfbrowning opened this issue Apr 4, 2020 · 1 comment
Open

Unauthorized When Sending Production Origin Header #9

pfbrowning opened this issue Apr 4, 2020 · 1 comment

Comments

@pfbrowning
Copy link

I'm able to use https://thingproxy.freeboard.io/fetch/http://79.111.119.111:9107/7.html successfully via Postman and my web app in the browser while sending http://localhost:4200 as the Origin header.

However, when I set Origin to my production URL (http://radio.browninglogic.com) (both from Postman and from the deployed web app), I get the following:

{
    "this": "failed",
    "with": 401,
    "because": {
        "message": "unauthorized"
    },
    "id": "lKKaSKW3f"
}

Strangely enough, when I clone and run the API locally, it appears to work properly even with the same Origin header that's causing it to fail when using the deployed site (http://thingproxy.freeboard.io/fetch/url).

Can you point me in the right direction? Is there something that I'm missing?

@zinthose
Copy link

edit your exports.blacklist_hostname_regex value inside the config.js file or set it within your code to allow for localhost.

// Original Value
// exports.blacklist_hostname_regex = /^(10\.|192\.|127\.|localhost$)/i;

// Allow for localhost
exports.blacklist_hostname_regex = /^(10\.|192\.|127\.)/i;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants