Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Rust
    @LooMaclin
        server.post("/sample", middleware! { |request, response|
            (StatusCode::Ok, "Ok")
        });
    Sebastian Blei
    @iamsebastian
    And where did you utilize the server with the CORS middleware?
    Rust
    @LooMaclin
    @iamsebastian yep
    Sebastian Blei
    @iamsebastian
    You've also written a preflight middleware?
    Rust
    @LooMaclin
    @iamsebastian i'm use PostgresMiddleware
    and nickel-jwt-session
    Rust
    @LooMaclin
    but..i'm disabled this for debugging cors post problem
    Sebastian Blei
    @iamsebastian
    Sorry, had a meeting.
    You need to implement a preflight middleware, @LooMaclin. Otherwise, it's not possible for your frontend to do preflights.
    Here's mine:
    pub fn enable_options_preflight<'mw>(_req: &mut Request, mut res: Response<'mw>) -> MiddlewareResult<'mw> {
        // Set HTTP 200.
        // ContentType should be text/plain.
        res.set(Ok)
            .set(ContentType::plaintext());
        // Just "ok" as response text.
        res.send("Ok")
    }
    And implement it at one of the first points on your Nickel::Server:
    srv.options("**/*", middlewares::enable_options_preflight);
    Rust
    @LooMaclin
    @iamsebastian thx, i'm try this and send feedback
    Sebastian Blei
    @iamsebastian
    :)
    Alex Creamer
    @AlexCreamer
    Hi, can someone help me out with a couple of my bugs?
    One of them is that when using Atom with remote-server using rmate on a remote server, I get error saying that the "nickel" crate was unable to be found.
    Second, how do I handle form submittions using Nickel?
    Alex Creamer
    @AlexCreamer
    Fixed!
    Emīls Piņķis
    @pinkisemils
    anyone here used diesel with foreign keys ?
    Denis Lisov
    @tanriol
    Sorry for being rough, but is Nickel still alive? The activity level seems to be zero these days...
    Sebastian Blei
    @iamsebastian
    @pinkisemils Yes. Sorry for late answer. :)
    @tanriol Does not seems to be.
    Azzuwan Aziz
    @azzuwan
    Hey guys
    Who here has experience running Nickel in prod?
    Just a curious question :)
    Denis Lisov
    @tanriol
    The activity here is pretty minimal these days.
    Sebastian Blei
    @iamsebastian
    @azzuwan /me
    Sorry for late response
    Oh ... late . .. 5 weeks ago. :clap:
    Lorenzo Iannuzzi
    @lorenzoi
    anyone on?
    Sebastian Blei
    @iamsebastian
    True
    Lorenzo Iannuzzi
    @lorenzoi
    LaTeXLaTeX
    oops sorry
    Sebastian Blei
    @iamsebastian
    np
    Lorenzo Iannuzzi
    @lorenzoi
    when I run Nickel with a template I get a internal server error. You know how to help?
    Sebastian Blei
    @iamsebastian
    Run your server with RUST_BACKTRACE=1 RUST_LOG=info and try it again
    Lorenzo Iannuzzi
    @lorenzoi
    ok
    Sebastian Blei
    @iamsebastian
    Then you've maybe enough info for debugging.
    Lorenzo Iannuzzi
    @lorenzoi
    works now :) Thanks
    Sebastian Blei
    @iamsebastian
    You're welcome.
    LeonineKing1199
    @LeonineKing1199
    How does this library compare to the premiere tech stack of 2019, Beast/Asio?
    For example, I'm not sure if I'm a fan of routing being done for me
    I'm a huge fan of PEGging when I need to parse something
    Also, Beast had a formal security audit
    Has this been audited as well?
    I'm thinking about switching but need to make sure some things are in place
    Denis Lisov
    @tanriol
    IMHO, this particular library is kinda zombie, hardly maintained. I'm migrating my projects off it, not to it.
    LeonineKing1199
    @LeonineKing1199
    Oof, you're right
    The last messages are from April
    April!!!!
    Denis Lisov
    @tanriol
    April 2017 ;-)
    Jeff Olhoeft
    @jolhoeft
    Development is currently slow, although we have more activity in github issues. I'd forgotten about this channel.
    I cannot comment about Beast/Asio, that being a C++ based system, and it's been many years since I'e worked in C++. Nickel.rs has not had a security audit.
    LeonineKing1199
    @LeonineKing1199
    Well, they're pretty expensive, apparently :P
    But it's good to detect vulnerabilities in the HTTP parser
    Jeff Olhoeft
    @jolhoeft
    If we have the resources for one, we'll have one done, but at hte moment nickel.rs is an all volunteer effort.
    Marwan Rabbâa
    @waghanza
    Hi, does nickel support route constraint ?
    Denis Lisov
    @tanriol
    What do you mean by route constraint?
    P.S. I hope you're not starting a new project with Nickel :-)