Skip to content

Feature/relative url #307

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

Merged
merged 8 commits into from
Apr 11, 2019
Merged

Feature/relative url #307

merged 8 commits into from
Apr 11, 2019

Conversation

yamajik
Copy link
Contributor

@yamajik yamajik commented Mar 21, 2019

Issue: #241

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

Is there an open issue you can link to?

@yamajik
Copy link
Contributor Author

yamajik commented Mar 21, 2019

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

@umdstu
Copy link

umdstu commented Mar 28, 2019

@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
Copy link

au5ton commented Apr 1, 2019

polite ping

@@ -47,7 +47,8 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
},
set: (value: string): void => {
if (value) {
value = value.replace(/file:\/\//g, "/resource");
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
Copy link
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
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

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