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

Support customize default host(instead of localhost). #41

Merged
merged 1 commit into from Dec 28, 2018

Conversation

beastoin
Copy link

@beastoin beastoin commented Aug 7, 2018

For the specific project in the real word, for the security issues, we have the need that how to customize both host and post So I think It may be helpful for another. Thank you ;)

Ex: It's lozi.local:port in my case.

@slizlaszlo
Copy link

slizlaszlo commented Nov 8, 2018

Hi @arjun-g , could you accept this PR, this would be super useful. Thanks in advance :)

@alexmcroberts
Copy link

@beastoin the Pull Request is quite a lot larger than it needs to be, mainly because of the file formatting. Making the Pull Request shorter is going to help @arjun-g merge it quicker.

Here's a list of suggested changes:

  • Remove the .DS_Store file from the Pull Request
  • In the file package.json:
    • reset the engine back to "vscode": "^1.23.0"
    • change the whitespace to tabs for the lines of code for defining defaultHost
  • In the file server.ts:
    • Undo all formatting changes:
      • Use tabs instead of spaces
      • Use single quotes instead of double quotes
      • Undo the fixed line length enforced line-wrapping
      • Replace removed round brackets e.g. line 45
    • I believe the changes in this file only need to be 3 lines:
      • add the const SERVER_HOST = ...
      • add the currentHost: string = SERVER_HOST;
      • change the getUrl() function to include the currentHost value

@beastoin
Copy link
Author

@beastoin the Pull Request is quite a lot larger than it needs to be, mainly because of the file formatting. Making the Pull Request shorter is going to help @arjun-g merge it quicker.

Here's a list of suggested changes:

* Remove the .DS_Store file from the Pull Request

* In the file package.json:
  
  * reset the engine back to `"vscode": "^1.23.0"`
  * change the whitespace to tabs for the lines of code for defining `defaultHost`

* In the file server.ts:
  
  * Undo all formatting changes:
    
    * Use tabs instead of spaces
    * Use single quotes instead of double quotes
    * Undo the fixed line length enforced line-wrapping
    * Replace removed round brackets e.g. line [45](https://github.com/arjun-g/vs-swagger-viewer/pull/41/files#diff-fbe3cbee20379f519182721b610e9958R45)
  * I believe the changes in this file only need to be 3 lines:
    
    * add the `const SERVER_HOST = ...`
    * add the `currentHost: string = SERVER_HOST;`
    * change the `getUrl()` function to include the currentHost value

Very appreciate about your suggestion @alexmcroberts. I have updated the pull request, please check and let me know if there have anything I should change to help @arjun-g merge it quicker.

@slizlaszlo I think it will be merged soon :D, but in case you need, I can support by building a vscode plugin install file.

@arjun-g arjun-g merged commit e42af4b into arjun-g:master Dec 28, 2018
@arjun-g
Copy link
Owner

arjun-g commented Dec 28, 2018

@beastoin thanks and sorry for the delay. A new version of the extension is published with this PR.
@alexmcroberts thanks for helping out.

@beastoin beastoin deleted the customize-default-host branch December 30, 2018 07:00
@beastoin
Copy link
Author

@beastoin thanks and sorry for the delay. A new version of the extension is published with this PR.
@alexmcroberts thanks for helping out.

Thanks 🚀

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.

None yet

4 participants