meteor-ssl icon indicating copy to clipboard operation
meteor-ssl copied to clipboard

Fix for issue #2 (socket hangup) not present in package installed by meteor

Open v1934 opened this issue 3 years ago • 0 comments

Hi, I'm having a problem with socket hangup in this package which is driving me crazy.

I have noticed that this issue was resolved already in issue #2

however, the bug still appears in my project almost every time it rebuilds... I have checked my meteor package cache and I noticed that the code there is completely different from the code that is here on github:

(function () {

///////////////////////////////////////////////////////////////////////
//                                                                   //
// packages/nourharidy:ssl/ssl.js                                    //
//                                                                   //
///////////////////////////////////////////////////////////////////////
                                                                     //
SSL = function(key, cert, port){                                     // 1
	var httpProxy = Npm.require('http-proxy');                          // 2
	var fs = Npm.require('fs');                                         // 3
	if(!port){                                                          // 4
		port = 443;                                                        // 5
	};                                                                  // 6
	httpProxy.createServer({                                            // 7
		target: {                                                          // 8
    		host: 'localhost',                                             // 9
    		port: process.env.PORT                                         // 10
  		},                                                               // 11
  		ssl: {                                                           // 12
    		key: fs.readFileSync(key, 'utf8'),                             // 13
    		cert: fs.readFileSync(cert, 'utf8')                            // 14
 		},                                                                // 15
 		ws: true,                                                         // 16
 		xfwd: true                                                        // 17
 	}).listen(port);                                                   // 18
};                                                                   // 19
                                                                     // 20
///////////////////////////////////////////////////////////////////////

}).call(this);

The path to file is: C:\Users\[USERNAME]\AppData\Local\.meteor\packages\nourharidy_ssl\0.2.2\os\packages\nourharidy_ssl.js

I have browsed through the entire package directory and there is no sign of the code that is here, on github (error handler on httpProxy). The package version as you can see is 0.2.2, I have tried removing the package and deleting the folder from the cache then adding it again, without any luck.

What is wrong that I don't get the fix in the package? I'll have to either modify it locally or screw this entire package and just do the SSL function myself..

v1934 avatar Mar 16 '21 09:03 v1934