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

Quarkus API URL should use https #402

Closed
fbricon opened this issue Oct 5, 2021 · 6 comments · Fixed by #404
Closed

Quarkus API URL should use https #402

fbricon opened this issue Oct 5, 2021 · 6 comments · Fixed by #404
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fbricon
Copy link
Collaborator

fbricon commented Oct 5, 2021

"default": "http://code.quarkus.io/api",

@angelozerr
Copy link
Contributor

@fbricon it seems code replace http with https

const platformApiRes = await httpsGet((QuarkusConfig.getApiUrl() + '/streams').replace(HTTP_MATCHER, "https://"));

@fbricon
Copy link
Collaborator Author

fbricon commented Oct 5, 2021

that's a hack! Shouldn't happen in the first place. You wouldn't be able to run against the quarkus api server running locally on a non https server.

@fbricon
Copy link
Collaborator Author

fbricon commented Oct 5, 2021

and it's only for getting the list of streams. Other places still use the package.json value

@fbricon fbricon added the enhancement New feature or request label Oct 5, 2021
@rgrunber
Copy link
Member

rgrunber commented Oct 5, 2021

Yup, I've noticed this. We have an http value in package.json which can be overriden by another default when it's parsed, and then we adjust that again with a regex/replace match. Seems we can remove those replacements by just using https everywhere.

@fbricon
Copy link
Collaborator Author

fbricon commented Oct 5, 2021

Don't assume https. https on production is a given, but running against a locally running api server means probably http.

@rgrunber
Copy link
Member

rgrunber commented Oct 5, 2021

Don't assume https. https on production is a given, but running against a locally running api server means probably http.

Whoops, I meant just our default values for https://github.com/redhat-developer/vscode-quarkus/blob/master/package.json#L173 & https://github.com/redhat-developer/vscode-quarkus/blob/master/src/definitions/constants.ts#L39 should be https if not already and we should avoid doing replacements on a user-defined value.

@rgrunber rgrunber self-assigned this Oct 6, 2021
@rgrunber rgrunber added this to the 1.9.1 milestone Oct 6, 2021
rgrunber added a commit to rgrunber/vscode-quarkus that referenced this issue Oct 6, 2021
- Fixes redhat-developer#402
- Use 'https://code.quarkus.io/api' as the default
- Respect 'quarkus.tools.starter.api', by not replacing 'http' with
  'https' if it has been set to something else

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-quarkus that referenced this issue Oct 13, 2021
- Fixes redhat-developer#402
- Adjust testcase due to changing platform versions
- Use 'https://code.quarkus.io/api' as the default
- Respect 'quarkus.tools.starter.api', by not replacing 'http' with
  'https' if it has been set to something else

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit that referenced this issue Oct 13, 2021
- Fixes #402
- Adjust testcase due to changing platform versions
- Use 'https://code.quarkus.io/api' as the default
- Respect 'quarkus.tools.starter.api', by not replacing 'http' with
  'https' if it has been set to something else

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants