toptal / haste-server

open source pastebin written in node.js
https://www.toptal.com/developers/hastebin/about
2.92k stars 796 forks source link

Cant access key created my post request #390

Closed Nuckerr closed 2 years ago

Nuckerr commented 2 years ago

Hello, so I am making a post request to myhateserver.com/documents and it replies with a key (all the right stuff), and I get this in my logs image However, when I then go to myhasteserver.com/key it redirects me to the home page and I get this warning: image

My config:

{

  "host": "localhost",
  "port": 7777,

  "keyLength": 10,

  "maxLength": 400000,

  "staticMaxAge": 86400,

  "recompressStaticAssets": true,

  "logging": [
    {
      "level": "verbose",
      "type": "Console",
      "colorize": true
    }
  ],

  "keyGenerator": {
    "type": "phonetic"
  },

  "rateLimits": {
    "categories": {
      "normal": {
        "totalRequests": 500,
        "every": 60000
      }
    }
  },

  "storage": {
    "path": "./data",
    "type": "file"
  },

  "documents": {
    "about": "./about.md"
  }

}
Nuckerr commented 2 years ago

Same issue is happening on hastebin.com

konstrybakov commented 2 years ago

I've checked this with your config and works fine. Can you confirm this is still an issue for you?

Nuckerr commented 2 years ago

I have since been able to use it. I think I misunderstood how to use the api