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

Allow an optional proxy #716

Closed
wants to merge 2 commits into from
Closed

Allow an optional proxy #716

wants to merge 2 commits into from

Conversation

akirk
Copy link
Member

@akirk akirk commented Oct 19, 2023

What is this PR doing?

Instead of removing the proxy support #711, this (tempoarily?) brings back the ability to set it.

What problem is it solving?

In Translate Live, we use code from a Github branch that is used by a customized proxy.

How is the problem addressed?

Re-add setPluginProxyURL code so that a proxy URL can be set and if one is set, so that it's used.

Testing Instructions

The instructions of #711 still need to work, i.e. downloads.wordpress.org is to be used directly:

To test, go to http://localhost:5400/website-server/?theme=pendant&plugin=gutenberg and confirm that both the Pendant theme and the Gutenberg plugins are installed, and also that the zip files are downloaded directly from wordpress.org

Additionally, setting a proxy should have that be used.

@akirk akirk requested a review from adamziel October 19, 2023 16:03
@adamziel
Copy link
Collaborator

@akirk could you instead use a url resource with a full URL of your proxy endpoint?

@akirk
Copy link
Member Author

akirk commented Oct 20, 2023

@adamziel Not sure what you mean, the URL (specifically https://github.com/GlotPress/GlotPress/archive/refs/heads/local.zip) doesn't have the right CORS headers.

@adamziel
Copy link
Collaborator

@akirk I meant this:

{
    step: 'installPlugin',
    pluginZipFile: {
        resource: 'url',
        slug: 'https://translate.wordpress.org/plugin-proxy?plugin=glotpress-local.zip',
    }
}

@akirk
Copy link
Member Author

akirk commented Oct 20, 2023

Nice, that wors works, just slightly different (url key instead of slug):

{
    step: 'installPlugin',
    pluginZipFile: {
        resource: 'url',
        url: 'https://translate.wordpress.org/plugin-proxy?plugin=glotpress-local.zip',
    }
}

This means this PR is moot. Thank you!

@akirk akirk closed this Oct 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants