Skip to content

Add a way to proxy upstream requests instead of external links#460

Merged
amvanbaren merged 1 commit intoeclipse-openvsx:masterfrom
amvanbaren:feature/issue-452
Feb 21, 2023
Merged

Add a way to proxy upstream requests instead of external links#460
amvanbaren merged 1 commit intoeclipse-openvsx:masterfrom
amvanbaren:feature/issue-452

Conversation

@amvanbaren
Copy link
Copy Markdown
Contributor

@amvanbaren amvanbaren commented May 27, 2022

Fixes #452
Added UpstreamProxyService

Testing steps

  • Add to dev/application.properties:
ovsx:
  upstream:
    proxy:
      enabled: true
    url: https://open-vsx.org/
  • Run the server
  • Test the upstream endpoints
  • Expected result: all open-vsx.org links are rewritten to localhost:8080

@amvanbaren amvanbaren requested a review from benoitf May 27, 2022 18:01
@amvanbaren amvanbaren self-assigned this May 27, 2022
@amvanbaren amvanbaren added the priority:low Nice-to-have or can wait for community contributions label Jan 13, 2023
Fixes eclipse-openvsx#452
Added UpstreamProxyService
Add url rewriting to UpstreamVSCodeService.java

# Conflicts:
#	server/src/main/java/org/eclipse/openvsx/UpstreamRegistryService.java
#	server/src/main/java/org/eclipse/openvsx/adapter/UpstreamVSCodeService.java
Copy link
Copy Markdown
Contributor

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • feature seems to work awesome-ly! Rewrites happen correctly and all is well. Thanks!
  • when you put the upstream URL as localhost:8080 or similar, fun things happen 😄 - I don't think we need to address potential infinite loops any other way than the Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out. It is most likely enough, but maybe we can take a look later

@amvanbaren amvanbaren merged commit 062b3a7 into eclipse-openvsx:master Feb 21, 2023
@amvanbaren
Copy link
Copy Markdown
Contributor Author

@filiptronicek I've opened #675 to keep the upstream infinite loop in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:low Nice-to-have or can wait for community contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to proxy upstream requests instead of external links

2 participants