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 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

This comment has been minimized.

Copy link

slizlaszlo commented Nov 8, 2018

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

@alexmcroberts

This comment has been minimized.

Copy link

alexmcroberts commented Dec 6, 2018

@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 beastoin force-pushed the beastoin:customize-default-host branch from a0be4b3 to 93a7493 Dec 10, 2018
@beastoin

This comment has been minimized.

Copy link
Author

beastoin commented Dec 10, 2018

@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

This comment has been minimized.

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 beastoin:customize-default-host branch Dec 30, 2018
@beastoin

This comment has been minimized.

Copy link
Author

beastoin commented Dec 30, 2018

@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
Projects
None yet
4 participants
You can’t perform that action at this time.