@decocms/runtime 1.0.0-alpha.40 → 1.0.0-alpha.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/oauth.ts +1 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/runtime",
3
- "version": "1.0.0-alpha.40",
3
+ "version": "1.0.0-alpha.41",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "check": "tsc --noEmit",
package/src/oauth.ts CHANGED
@@ -480,11 +480,7 @@ export function createOAuthHandlers(oauth: OAuthConfig) {
480
480
  /**
481
481
  * Check if request has authentication token
482
482
  */
483
- const hasAuth = (req: Request): boolean => {
484
- const authHeader = req.headers.get("Authorization");
485
- const meshToken = req.headers.get("x-mesh-token");
486
- return !!(authHeader || meshToken);
487
- };
483
+ const hasAuth = (req: Request) => req.headers.has("Authorization");
488
484
 
489
485
  return {
490
486
  handleProtectedResourceMetadata,