Closed DerZade closed 4 years ago
We do not need to set the cors headers in the optionsHandle manually, because those headers are set by the forum itself.
optionsHandle
https://github.com/gruppe-adler/nodebb-plugin-arma3-slotting/blob/e36dbb615d894fe58db2406762c271347f2d54e2/lib/api.ts#L248-L257
Also we do not need the methodNotAllowed, because it will catch any requests and close the connection, before the forum can set the cors http headers.
methodNotAllowed
https://github.com/gruppe-adler/nodebb-plugin-arma3-slotting/blob/e36dbb615d894fe58db2406762c271347f2d54e2/lib/api.ts#L89-L95
(This is already monkey patched in our production forum 😉)
We do not need to set the cors headers in the
optionsHandle
manually, because those headers are set by the forum itself.https://github.com/gruppe-adler/nodebb-plugin-arma3-slotting/blob/e36dbb615d894fe58db2406762c271347f2d54e2/lib/api.ts#L248-L257
Also we do not need the
methodNotAllowed
, because it will catch any requests and close the connection, before the forum can set the cors http headers.https://github.com/gruppe-adler/nodebb-plugin-arma3-slotting/blob/e36dbb615d894fe58db2406762c271347f2d54e2/lib/api.ts#L89-L95