Skip to content

Conversation

@raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Feb 26, 2019

This is a follow-up to #2387. It makes sure REST explorer also honors the baseUrl.

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

Copy link
Contributor

@nabdelgadir nabdelgadir left a comment

Choose a reason for hiding this comment

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

💯

@raymondfeng raymondfeng merged commit 5d2db07 into master Feb 27, 2019
@raymondfeng raymondfeng deleted the fix-express-rest-explorer branch February 27, 2019 16:40
Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

👏

this.response.redirect(301, this.request.url + '/');
let url = this.request.url + '/';
if (this.request.baseUrl && this.request.baseUrl !== '/') {
url = this.request.baseUrl + url;
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, this can be simplified using req.originalUrl, see #2508

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.

4 participants