Skip to content

Commit

Permalink
Changing the way to display security.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
pparage committed Sep 18, 2024
1 parent 5a5d7f7 commit 73d10f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
19 changes: 12 additions & 7 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "./css/carousel.css";
import "react-responsive-carousel/lib/styles/carousel.min.css";
import { NotificationContainer } from "react-notifications";
import "react-notifications/lib/notifications.css";
import { BrowserRouter } from "react-router-dom";
import { BrowserRouter, Route, Switch } from "react-router-dom";
import InsideApp from "./component/InsideApp.jsx";
import { getApiURL } from "./utils/env.jsx";

Expand All @@ -26,12 +26,17 @@ export default class App extends React.Component {

render() {
return (
<div id="App">
<BrowserRouter>
<InsideApp {...this.props}/>
<NotificationContainer/>
</BrowserRouter>
</div>
<BrowserRouter>
<Switch>
<Route exact path="/.well-known/security.txt" />
<Route>
<div id="App">
<InsideApp {...this.props} />
<NotificationContainer />
</div>
</Route>
</Switch>
</BrowserRouter>
);
}
}
File renamed without changes.
2 changes: 0 additions & 2 deletions src/component/InsideApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import PageContact from "./page/PageContact.jsx";
import PageSupport from "./page/PageSupport.jsx";
import PageSearch from "./page/PageSearch.jsx";
import Page404 from "./page/Page404.jsx";
import SecurityTxt from "./SecurityTxt.jsx";

class InsideApp extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -235,7 +234,6 @@ class InsideApp extends React.Component {
taxonomies={this.state.taxonomies}
{...props}
/>}/>
<Route path="/.well-known/security.txt" component={SecurityTxt} />

{/* Internal redirections */}

Expand Down

0 comments on commit 73d10f4

Please sign in to comment.