Skip to content

Commit

Permalink
Remove meta tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlisa committed Dec 31, 2024
1 parent 26bc75f commit 0729ad9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions lib/web/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ func NewHandler(cfg Config, opts ...HandlerOption) (*APIHandler, error) {
// The web app will show them the login page in this case.
session, _ := h.authenticateWebSession(w, r)
session.XCSRF = csrfToken
session.Version = teleport.Version

httplib.SetNoCacheHeaders(w.Header())
httplib.SetIndexContentSecurityPolicy(w.Header(), cfg.ClusterFeatures, r.URL.Path)
Expand Down Expand Up @@ -730,7 +729,6 @@ func NewHandler(cfg Config, opts ...HandlerOption) (*APIHandler, error) {
type webSession struct {
Session string
XCSRF string
Version string
}

func (h *Handler) authenticateWebSession(w http.ResponseWriter, r *http.Request) (webSession, error) {
Expand Down
1 change: 0 additions & 1 deletion web/packages/teleport/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="grv_csrf_token" content="{{ .XCSRF }}" />
<meta name="grv_bearer_token" content="{{ .Session }}" />
<meta name="teleport_version" content="{{ .Version }}" />
<meta name="robots" content="noindex" />
<link
href="/app/favicon-light.png"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import makeNode from '../nodes/makeNode';
import auth, { MfaChallengeScope } from '../auth/auth';
import { App } from '../apps';
import makeApp from '../apps/makeApps';
import { withUnsupportedLabelFeatureErrorConversion } from '../webUiVersion/webUiVersion';
import { withUnsupportedLabelFeatureErrorConversion } from '../version/unsupported';

import {
Integration,
Expand Down
2 changes: 1 addition & 1 deletion web/packages/teleport/src/services/joinToken/joinToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import api from 'teleport/services/api';
import cfg from 'teleport/config';

import { makeLabelMapOfStrArrs } from '../agents/make';
import { withUnsupportedLabelFeatureErrorConversion } from '../webUiVersion/webUiVersion';
import { withUnsupportedLabelFeatureErrorConversion } from '../version/unsupported';

import makeJoinToken from './makeJoinToken';
import { JoinToken, JoinRule, JoinTokenRequest } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@

import { ApiError } from '../api/parseError';

export function getWebUiVersion() {
const metaTag = document.querySelector<HTMLMetaElement>(
'[name=teleport_version]'
);
return metaTag?.content || '';
}

export function withUnsupportedLabelFeatureErrorConversion(
err: unknown
): never {
Expand Down

0 comments on commit 0729ad9

Please sign in to comment.