[GH-ISSUE #1423] Proxy server works in the url but not if in the settings #457

Closed
opened 2026-03-16 15:26:14 +03:00 by kerem · 5 comments
Owner

Originally created by @nathanielread on GitHub (Jan 11, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1423

I setup my own docker based proxy server. When I put the proxy server url into the hoppscotch request url, it works. Example:
https://cors.website.com/https://google.com

When I put the proxy server url (https://cors.website.com/) in the proxy config of hoppscotch and leave it out of the request url, it gives me this error:

TypeError: Cannot read property 'message' of undefined
    at e0cab83.modern.js:1
    at Generator.next (<anonymous>)
    at r (c0ab92f.modern.js:2)
    at l (c0ab92f.modern.js:2)

I'm running hoppscotch in docker, manually build through the Dockerfile, behind jwilder nginx-proxy.

Not a huge deal, but any thoughts?

Originally created by @nathanielread on GitHub (Jan 11, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1423 I setup my own docker based proxy server. When I put the proxy server url into the hoppscotch request url, it works. Example: https://cors.website.com/https://google.com When I put the proxy server url (https://cors.website.com/) in the proxy config of hoppscotch and leave it out of the request url, it gives me this error: ``` TypeError: Cannot read property 'message' of undefined at e0cab83.modern.js:1 at Generator.next (<anonymous>) at r (c0ab92f.modern.js:2) at l (c0ab92f.modern.js:2) ``` I'm running hoppscotch in docker, manually build through the Dockerfile, behind jwilder nginx-proxy. Not a huge deal, but any thoughts?
kerem 2026-03-16 15:26:14 +03:00
Author
Owner

@liyasthomas commented on GitHub (Jan 11, 2021):

In Settings > Proxy, under the hood Hoppscotch uses a custom proxy server. You can build it and host it on your own to use it along with any Hoppscotch instances. Instructions can be found at hoppscotch/proxyscotch. Also there's a docker container available: https://hub.docker.com/r/hoppscotch/proxyscotch.

<!-- gh-comment-id:757624893 --> @liyasthomas commented on GitHub (Jan 11, 2021): In Settings > Proxy, under the hood Hoppscotch uses a [custom proxy server](https://github.com/hoppscotch/proxyscotch). You can build it and host it on your own to use it along with any Hoppscotch instances. Instructions can be found at [hoppscotch/proxyscotch](https://github.com/hoppscotch/proxyscotch). Also there's a docker container available: https://hub.docker.com/r/hoppscotch/proxyscotch.
Author
Owner

@nathanielread commented on GitHub (Jan 11, 2021):

Yes, I built my own, not based on proxyscotch, though.
I built it based on this one: https://hub.docker.com/r/redocly/cors-anywhere

And when I put that proxy server url in the hoppscotch settings, it doesn't work. Is that because only the proxyscotch server works in that config?

<!-- gh-comment-id:758181376 --> @nathanielread commented on GitHub (Jan 11, 2021): Yes, I built my own, not based on proxyscotch, though. I built it based on this one: https://hub.docker.com/r/redocly/cors-anywhere And when I put that proxy server url in the hoppscotch settings, it doesn't work. Is that because only the proxyscotch server works in that config?
Author
Owner

@liyasthomas commented on GitHub (Jan 12, 2021):

Is that because only the proxyscotch server works in that config?

Yes

Hoppscotch Proxy mode is tailored to work only with Proxyscotch. Alternatively you can install our browser extensions to bypass CORS restrictions.

<!-- gh-comment-id:758311235 --> @liyasthomas commented on GitHub (Jan 12, 2021): > Is that because only the proxyscotch server works in that config? Yes Hoppscotch Proxy mode is tailored to work only with Proxyscotch. Alternatively you can install our browser extensions to bypass CORS restrictions.
Author
Owner

@nathanielread commented on GitHub (Jan 12, 2021):

Thanks! I pulled the docker image, put it behind jwilder nginx-proxy and the proxy settings in hoppscotch works.
Any advice on setting a proxyscotch token in docker-compose? Env variable?

<!-- gh-comment-id:758359993 --> @nathanielread commented on GitHub (Jan 12, 2021): Thanks! I pulled the docker image, put it behind jwilder nginx-proxy and the proxy settings in hoppscotch works. Any advice on setting a proxyscotch token in docker-compose? Env variable?
Author
Owner

@liyasthomas commented on GitHub (Jan 12, 2021):

As per Proxyscotch Docs,

  • The host and token parameters are optional. The defaults are as follows:
  • host: localhost:9159
  • token: blank; allowing anyone to access (see below)
  • NOTE: When the token is blank it will allow anybody to access your proxy server. This may be what you want, but please be sure to consider the security implications.

I'm not a docker expert 🙏 but you can find a way to pass env variables in docker compose from here and here.

<!-- gh-comment-id:758363382 --> @liyasthomas commented on GitHub (Jan 12, 2021): As per [Proxyscotch Docs](https://github.com/hoppscotch/proxyscotch#servers-), > - The host and token parameters are optional. The defaults are as follows: > - host: localhost:9159 > - token: blank; allowing anyone to access (see below) > - NOTE: When the token is blank it will allow anybody to access your proxy server. This may be what you want, but please be sure to consider the security implications. I'm not a docker expert 🙏 but you can find a way to pass env variables in docker compose from [here](https://docs.docker.com/compose/environment-variables/) and [here](https://stackoverflow.com/questions/29377853/how-to-use-environment-variables-in-docker-compose).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#457
No description provided.