Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chen V
    @ChendrayanV_twitter
    AFAIK no authentication in Polaris, that's the reason i opted for basic auth and passing in headers. Similarly, we can choose bearer and go for timeouts for security.
    I mean no docs. Let me know if I can help u out in imementation
    Chen V
    @ChendrayanV_twitter
    For Polaris hanging issues are occurred mainly in
    Sorry for the above incorrect statement šŸ‘†
    What happens if u remove psreadline module and try? Polaris hangs?
    PowerShell Connect
    @PoshConnect_twitter
    acc (discord) Hey, I created a route with -Path "/" and trying to run it through reverse proxy. i've actually got nginx location directive watching out for /test and push a bunch of it to http://localhost:8080/ but the responses i'm getting are just "Not found (Not Found)"
    acc (discord) any tips? šŸ™‚
    PowerShell Connect
    @PoshConnect_twitter
    This message was deleted
    acc (discord) i can invoke-restmethod locally, but only if i interact with pwsh by pressing enter or something, let me share..
    acc (discord) the "Not found (Not Found)" thing in browser definitely seems to be proxy related because of course, as you can see, sending a get req locally on the box is fine. and also browsing to it locally http://localhost:8080 in chrome or something shows the response i configured for the route
    PowerShell Connect
    @PoshConnect_twitter
    acc (discord) maybe because powershell isn't "supported" with nginx? nginx/unit#112 (edited)
    acc (discord) btw, this is the route I'm using
    New-PolarisRoute -Method GET -Path "/" -ScriptBlock {
        $Response.Send('Hello World!')
    }
    Donal
    @ddmee
    Where can I see the logs that polaris writes?
    PowerShell Connect
    @PoshConnect_twitter

    tiberriver256 (slack) @ddmee - The default logger just uses Write-Host so the logs go poof if you don't override the logger.

    ```It "Allows a custom logger" {
    $Port = Get-Random -Minimum 8000 -Maximum 8999
    $Polaris = Start-Polaris -Port $Port
    $Polaris.Logger = {
    param($LogString)
    $Word | Out-File "TestDrive:\test.log" -NoNewline
    }

     $Polaris.Log("Hello") 
     Get-Content "TestDrive:\test.log" -Raw | Should be "Hello" 

    } ```

    tiberriver256 (slack) The built-in logging is pretty rudimentary though. grtswt just put in an issue to discuss standardization: PowerShell/Polaris#205
    daver99
    @daver99
    HI -- anyone following this still?? I'm trying to get Polaris to be available on my Azure VM. I've opened ports and firewall, but I just get an Invalid Hostname. The same scripts run fine on machines in my office LAN. Any suggestions as to how to get this operational? I've set up a dns name in azure, it does resolve, running on port 8082, but the response is failing.
    PowerShell Connect
    @PoshConnect_twitter
    tiberriver256 (slack) Hey daver, I lurk here on occasion šŸ™‚
    tiberriver256 (slack) What's your Start-Polaris command look like?
    daver99
    @daver99
    $app = Start-Polaris -Port $portToUse -MinRunspaces 1 -MaxRunspaces 5 -UseJsonBodyParserMiddleware -Verbose # all params are optional
    PowerShell Connect
    @PoshConnect_twitter
    tiberriver256 (slack) If you're using the latest from the Github repo (@tyler) is working on getting it published out to the gallery you should also specify the hostname you want Polaris to listen on like:
    $app = Start-Polaris -Hostname $Hostname -Port $portToUse -MinRunspaces 1 -MaxRunspaces 5 -UseJsonBodyParserMiddleware -Verbose # all params are optional
    tiberriver256 (slack) Otherwise if you're using the version from the gallery I believe you have to run it as admin to get it to listen on something other than localhost
    tiberriver256 (slack) You can check for sure what hostname it's listening on by doing:
    (get-polaris).Listener.Prefixes
    PowerShell Connect
    @PoshConnect_twitter
    tiberriver256 (slack) If you don't want to update and you don't want to run as administrator you can do:
    $app = Start-Polaris -Hostname $Hostname -Port $portToUse -MinRunspaces 1 -MaxRunspaces 5 -UseJsonBodyParserMiddleware -Verbose # all params are optional $app.Listener.Prefixes.Add("http://myhostname.mydomain.com")
    daver99
    @daver99
    I've got the latest ( I think) - it does take hostname. So if my azure vm is assigned postvman.westus2.cloudapp.azure.com
    Then I use that full name as the hostname param?
    (I'm running as admin)
    PowerShell Connect
    @PoshConnect_twitter
    tiberriver256 (slack) Yep, that's correct.
    daver99
    @daver99
    nice.. thank you very much -- trying now!
    PowerShell Connect
    @PoshConnect_twitter
    tiberriver256 (slack) If that doesn't work run (get-polaris).Listener.Prefixes and make sure the URL there looks like you would expect
    tiberriver256 (slack) It should print the full url like: http://pstvman.westus2.cloudapp.azure.com
    daver99
    @daver99
    10 4 - all systems go!
    PowerShell Connect
    @PoshConnect_twitter

    tiberriver256 (slack) If you need https there's some good tips on this issue for setting it up:
    PowerShell/Polaris#107

    Still open issue to get it into the docs

    daver99
    @daver99
    thanks Tyler - I use this internally for a few dashboards for the team and just now am deploying for a small api for multi-locations!
    PowerShell Connect
    @PoshConnect_twitter
    Jeremy McGee (slack) @daver99 have you tried using Pode? It's comparable to polaris. But, it's more maintained.
    lxlechat (slack) if you have a litle money, you should try UniversalDashboard
    daver99
    @daver99
    Have not tried Pode -- I saw the earlier comments and it does look more complete --- but maybe more complex to get going. My uses are super light so I love my one-file endpoints. Thanks though!
    PowerShell Connect
    @PoshConnect_twitter
    stuart303 (slack) Does anyone have an example of how to use Polaris with Streams?
    Joe Rodriguez
    @joerod
    when i enable negotiate for auth where do i add the user permissions for this in polaris?
    also is anyone using polaris behind an IIS reverse proxy?
    PowerShell Connect
    @PoshConnect_twitter
    acc (discord) i think reverse proxy support is limited, at least it was when i tried nginx a few months ago
    PowerShell Connect
    @PoshConnect_twitter

    tiberriver256 (slack) @joerod - Just updated the docs with the new authentication guide that explains it:
    https://powershell.github.io/Polaris/docs/about_Authentication.html

    tl;dr $Request.User.IsInRole('Administrators') is how you check to see if the authenticated user is in a particular security group

    tiberriver256 (slack) Putting it behind a reverse proxy should be similar to putting Node.js or something else behind a reverse proxy. Introducing a reverse proxy inherently brings a few limitations but Polaris (or any other web server) wouldn't really have any way to know it's behind a reverse proxy or be able to behave any differently. It should just work. I haven't seen any blog posts on anyone using it behind IIS reverse proxy yet though.
    PowerShell Connect
    @PoshConnect_twitter
    joerod (slack) Awesome, I only want to put it behind the reverse proxy so Iā€™m sure negotiate is using Kerberos and not ntlm.

    tiberriver256 (slack) Never merged it because I was going to clean up grammatical errors but I believe this was a technically valid explanation of getting Kerberos working w/ Polaris if you want to check it out and see if it works for you.

    PowerShell/Polaris#203

    PowerShell Connect
    @PoshConnect_twitter
    ashishcw (discord) Hi All,
    Hope you are doing fine, I've heard of this web-framework recently, and trying my hands at it just now.
    ashishcw (discord) So, trying to install on PS 4.0 with git repo(psd) file.
    ashishcw (discord) but it's giving an error.
    ashishcw (discord) can anyone please point me in the right direction, as where can I find a documentation or how to guide?
    PowerShell Connect
    @PoshConnect_twitter
    ashishcw (discord) UPDATE : Upon stumbling across on google results, I assume, Polaris works with powershell 5.1 and above.