1

Usually I can count on someone on Stack Overflow already asking a questions. However, I can't seem to track one down so ... my first post!

I have recently pushed a SailsJs application for deployment on AppFog. When running the app in both development or production mode on my local machine it runs perfectly. When I run it on AppFog as development it runs fine as well. However, as soon as I change the global variable in AppFog to set it to production mode I begin to get 'forbidden' errors when I try to POST to a 'create' route. My gut tells me that there is something going on with the CSRF, but I don't know what. If it is a CSRF issue wouldn't it also be occurring in development mode as well?

Thanks in advance. I'm stuck here and I can find little Sails documentation and what's happening when it switches to production aside from minifing CSS and JS.

sgress454
  • 24,870
  • 4
  • 74
  • 92
gregdillon
  • 23
  • 4
  • Hmm is there anything in the log? If so, would you mind posting the error message? Also, would you mind posting your Sails version? – mikermcneil Jan 05 '14 at 21:20
  • I'm using 0.9.8. I was using 0.9.7, but upgraded to see if that would fix it. I tried deploying to Heroku and it worked perfectly. Something is happening in the minification process I believe. As a test I pulled out all the socket javascript files from sails. This let it run in production mode, but I don't think it was because socket was remove. I think it was because that cause the 'production.js' file to error. I know AppFog doesn't support sockets, but I didn't think it would cause problems because it would just pick a fall back. – gregdillon Jan 07 '14 at 15:49

0 Answers0