Skip to content

Feature/relative url#307

Merged
code-asher merged 8 commits into
coder:masterfrom
majikxu:feature/relative-url
Apr 11, 2019
Merged

Feature/relative url#307
code-asher merged 8 commits into
coder:masterfrom
majikxu:feature/relative-url

Conversation

@majikxu

@majikxu majikxu commented Mar 21, 2019

Copy link
Copy Markdown
Contributor

Issue: #241

Describe in detail the problem you had and how this PR fixes it

Is there an open issue you can link to?

@majikxu

majikxu commented Mar 21, 2019

Copy link
Copy Markdown
Contributor Author

Problems still exist while using relative url ("resource").
location.pathname + relative_url will fix it.

@umdstu

umdstu commented Mar 28, 2019

Copy link
Copy Markdown

@kylecarbs - I know this is only a week old, but do you have an estimate for when you'll be able to review this PR?

Thanks!

@au5ton

au5ton commented Apr 1, 2019

Copy link
Copy Markdown

polite ping

set: (value: string): void => {
if (value) {
value = value.replace(/file:\/\//g, "/resource");
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't this only catch URLs that end with /?

Something like https://ide.kwc.io/banana wouldn't be caught with this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This makes sure the url is correct.

Both
https://ide.kwc.io/banana
https://ide.kwc.io/banana/
use
https://ide.kwc.io/banana/resource
to request the resources

@ShannonMasters

Copy link
Copy Markdown

any chance of getting this merged in for the next release? this is a pretty big issue for how my environment is atm (of which I have limited control)

@code-asher code-asher merged commit 4b217fb into coder:master Apr 11, 2019
@aofei aofei mentioned this pull request May 17, 2019
code-asher pushed a commit that referenced this pull request Jun 19, 2019
* resrouce relative url

* add url pathname for require.toUrl (fix webview url)

* rest resrouce relative url

* fix resource url

* ignore .vscode
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.

6 participants