Skip to content

[email protected] (RC5 starter pack) "--proxy option" stop working #1712

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

Closed
jacovc86 opened this issue Aug 16, 2016 · 8 comments
Closed

[email protected] (RC5 starter pack) "--proxy option" stop working #1712

jacovc86 opened this issue Aug 16, 2016 · 8 comments

Comments

@jacovc86
Copy link

jacovc86 commented Aug 16, 2016

window 10

angular-cli: 1.0.0-beta.11-webpack.2
node: 6.3.1
os: win32 x64

Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
create a new project and serve it with ng serve --proxy http://some/proxy/url

Worked in the rc4 project structure

@mmrath
Copy link
Contributor

mmrath commented Aug 16, 2016

Please see PR #1487

@mmrath
Copy link
Contributor

mmrath commented Aug 16, 2016

Duplicate of #889

@jacovc86
Copy link
Author

Thanks @mmrath, found a temporary hack:

angular-cli/addons/ng2/tasks/ng-serve-webpack.ts:33

...
inline: true,
proxy: {
'/rest': commandOptions.proxy
}

if anyone else just want to get it going until it is configurable

@filipesilva
Copy link
Contributor

Closed by #1487

@wz2b
Copy link

wz2b commented Aug 29, 2016

This workaround works, thanks for the reference. In my case I need an additional option as well:

      proxy: {
         '/api':  {
             target: 'https://my.real.server.com,
             secure: false
         }
      }

It would be nice that, once this is permanently solved, there would be some way to pass in more robust options than just a string - possibly even a place to add a function/closure to be able to do some simple request mapping

@jasonswett
Copy link

@filipesilva This might be a dumb question but if this issue is closed by #1487, how come proxy doesn't work on the latest Webpack version (1.0.0-beta.11-webpack.8)?

@mmrath
Copy link
Contributor

mmrath commented Sep 8, 2016

Please see #1896 for documentation on how to use the --proxy-config option.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants