Skip to content

angular-cli@1.0.0-bata.11-webpack.2 (RC5 starter pack) "--proxy option" stop working #1712

Closed

Description

@jacovc86

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

Activity

  1. mmrath commented on Aug 16, 2016

    @mmrath
    Contributor

    Please see PR #1487

  2. mmrath commented on Aug 16, 2016

    @mmrath
    Contributor

    Duplicate of #889

  3. jacovc86 commented on Aug 16, 2016

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

  4. filipesilva commented on Aug 23, 2016

    @filipesilva
    Contributor

    Closed by #1487

  5. wz2b commented on Aug 29, 2016

    @wz2b

    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

  6. jasonswett commented on Sep 8, 2016

    @jasonswett

    @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)?

  7. mmrath commented on Sep 8, 2016

    @mmrath
    Contributor

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

  8. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions