Questions tagged [routes]

Questions about mapping URLs to Controllers and Actions.

routes
Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

Beginner in Laravel not working my routes inside middleware guest, and middleware auth all routes working well

This is all my routes inside web.php Route::get('/', function(){ return view('welcome-body'); }); Auth::routes(); Route::get('/dashboard', 'HomeController@index')->name('userdashboard')->...
John Michael Dusal's user avatar
0 votes
1 answer
496 views

Render JSON file in express to be interpolated in PUG

I'm making a website that displays my projects linked with their github repo. I've omitted the Pug files because of plagarism issues. (It's a school project) Now, I have to use Dynamic routing. ...
Khushi Malik's user avatar
0 votes
1 answer
431 views

multi language in laravel

in my laravel project I want to have multiple languages. I know there is a lang folder where you can store your different language templates and other things. the problem is : My domain is : example....
Amin Vakili's user avatar
2 votes
2 answers
4k views

How to route file to a different page in flutter

I'm making an app with Dart/ flutter now and having an issue with routing pages. The app is basically the matching app, and I want to add the functionality that a user can edit their profile. ...
user avatar
2 votes
2 answers
284 views

ASP.NET Core Attribute Routing - Locale Prefix

I have the following controller: [Route("blog")] [Route("{locale:regex(^(de|es|fr)$)}/blog", Order = -1)] public class BlogController : Controller { [HttpGet("{id:int}.htm")] [HttpGet("{slug}/...
nfplee's user avatar
  • 7,827
0 votes
1 answer
2k views

How to call a FastAPI route from NodeJS?

this is my FasiAPI route : @app.post("/files/") async def create_file(file: UploadFile = Form(...)): #some ml code return {'detected_face': base64_return, 'feature_vector': str(embedded)} ...
Rishav Kumar's user avatar
10 votes
1 answer
5k views

My AspNet Core 3.1 Identity Pages give a 404 in IdentityServer4. How can I access these? Is this a route problem?

I have followed the Deblokt tutorial here which explains in great detail how to set up IdentityServer4 in .net core 3.1 and use AspNetCore Identity for the user store. I can log in to my ...
Craig's user avatar
  • 859
0 votes
1 answer
347 views

Laravel 7 Middleware - How to create grouped middleware for non-authenticated users/guests for certain views/blade files

I created a group middleware for registered users. If a user is authenticated and logged-in then the user will be able to access views / pages inside the middleware, otherwise they will redirect to a ...
Denzell's user avatar
  • 309
2 votes
2 answers
7k views

Cannot POST to Express router (404 error)

I cannot fetch POST requests to my Express router. I have many GET requests which work fine, but this is my first POST request and it is not working. My frontend code looks like this: export async ...
Zuzim's user avatar
  • 85
3 votes
0 answers
259 views

How to highlight @Route in Symfony in VSCode similar to PhpStorm

Is there any way to highlight @Route in VSCode in Symfony Framework (similar to @Route in PhpStorm)? Right now @Route seems to be only a comment event though it works perfectly. I tried several ...
Bogdan's user avatar
  • 330
1 vote
1 answer
582 views

Angular 8 routing, cant navigate to component without a name before slash

By default, I want the browser to navigate to LandingPageComponent on opening. e.g. http://localhost:4200/ When users input after the slash, I want to navigate to ProfileComponent with parameters in ...
Jackal's user avatar
  • 523
0 votes
1 answer
539 views

Child routes depended on a condition in Angular 8

How I can load a component in a child routes depending on a condition? My routes: const mainRoutes: Routes = [ { path: '', component: MainComponent, canActivate: [AuthGuard], ...
IngBond's user avatar
  • 651
0 votes
1 answer
668 views

Load data from flask into html when pressing a button

I am trying to load a variable into a HTML page when pressing a button. The problem is that I already have a function to load the initial page, and the new data shall be loaded on the same page, ...
hb3's user avatar
  • 21
1 vote
1 answer
552 views

C# How get default gateways (routes) and their metrics from disabled or disconnected network adapters (interfaces)?

How get default gateways (routes) and their metrics from disabled or disconnected network adapters (interfaces) ? same as result using "netsh int ip show address" or "route print" ...
vavtech's user avatar
  • 41
0 votes
1 answer
854 views

"ReferenceError: database is not defined" i'm unable to find my mistake

This is the error message: ReferenceError: database is not defined at /Users/dspatiyal/Desktop/Mongo DB/index.js:12:21 at /usr/local/lib/node_modules/mongodb/lib/utils.js:731:5 This is ...
Utkarsh Patiyal's user avatar
0 votes
1 answer
70 views

Express next() is triggering next route which is parameterised after next() from current route is called

I have this route, /test which I called but somehow it is triggering /:async route as well when next() is called in /test route's finally? router.post('/test/:value?'async (req, res: express.Response,...
Helping hand's user avatar
  • 2,850
0 votes
1 answer
156 views

Progressive web apps and ASP.net routing

What I’m trying to achieve is provide users with a personalised ASP.net routed URL that they can add to their phone’s home screen. When they tap the icon it opens their personalised page PWA ...
Richard Creer's user avatar
8 votes
2 answers
1k views

How to prevent flash of dashboard content while unauthenticated in react-admin?

According to an older comment and what I am experiencing with my app, react-admin may show the Dashboard when not authenticated for a brief moment right before redirecting to and showing the login ...
Christiaan Westerbeek's user avatar
-4 votes
2 answers
410 views

Symfony - Two same routes with different access control

I have an index page that looks completely different for an authenticated and an unauthenticated user. Is it possible to create two seperate controllers with the same route path ("/") but one will be ...
Filip Kaszczyński's user avatar
1 vote
1 answer
1k views

linux shell cmd is not working for mininet host

I am trying to setup a mininet topology consisting one switch connected to three host. The below code does exactly the same thing and bring up the topology fine. But i see, none of the host.cmd is ...
Abhishek Sagar's user avatar
7 votes
2 answers
8k views

How do I map an endpoint to a static file in ASP. NET Core?

I am building a single page web application in ASP .NET Core which requires me to map some URLs to an endpoint which serves a specific static file called "index.html". Currently, I used a hack ...
shertu's user avatar
  • 471
0 votes
1 answer
436 views

Angular 9 on refresh url redirects to https on production

I am using angular 9, the issue I am facing on production is that, when ever I refresh page on browser it goes to https://subdomain.example.com/orders from http://subdomain.example.com/orders. I do ...
rishu Awasthi's user avatar
3 votes
5 answers
8k views

what is the equivalent of this.props.history.push('/some_route') of react class components in hooks?

I am trying to accomplish this import {isAuthorized} from '../somewhere' async componentDidMount() { const authorized = await isAuthorized() if(!authorized){ this.props.history.push('/login'...
Kritish Bhattarai's user avatar
0 votes
1 answer
765 views

Inheriting route attribute in .NET Core Web API

Let say I am going to make the following REST APIs: https://somedomain.com/api/Companies/{cid} https://somedomain.com/api/Companies/{cid}/Employees/{eid} https://somedomain.com/api/Companies/{cid}/...
mannok's user avatar
  • 1,772
0 votes
1 answer
809 views

Getting boolean value false while applying jsonwebtoken and testing api in POSTMAN

in this project i am testing each route after coding it.when i was testing my authantication ,i got my jsonwebtoken(from postman after applying post request).Now when i set my header key as:x-auth-...
TASKMASTER's user avatar
0 votes
0 answers
82 views

How to make my Route work with a controller? [duplicate]

use Illuminate\Support\Facades\Route; Route::get('/', 'StudentsController@index')->name('home'); Route::get('register', 'StudentsController@create')->name('create'); <?php namespace App\...
Yeru's user avatar
  • 1
0 votes
1 answer
2k views

Routing in Ionic React with IonCards

Hey Ladies and Gentlemen. I am using Ionic React to build an App. I am very new, it`s for my Uni and I wanted to try Ionic. So I am grateful for each help, information or tip. Destination: I want ...
Björn Ammon's user avatar
0 votes
0 answers
35 views

React Route shows up a blank page

I am creating a MERN project in webstorm. I am trying to direct to another React component upon clicking a button in one React component. I did that using Routes. Redirection happens. But the content ...
Prasadika's user avatar
  • 907
2 votes
1 answer
279 views

Python3 Flask route variable shows up as the variable name instead of value passed from postman

I have the following python flask api route: @user_api.route("/<int:id>", methods=["GET"]) @Authentication.auth_required def get_user(id): """ Get a user """ print(f"User id: {...
Kok How Teh's user avatar
  • 3,585
0 votes
1 answer
3k views

Framer motion with react route not working properly with slide effect

I am learning react in the past few days. I have beening play around with the slide animation of react routes, and using Framer Motion. However, I have tired many times and could not be able to get it ...
Kongeek's user avatar
  • 25
-1 votes
1 answer
276 views

Redirect and show the component if user is logged in in React

I have a login page which is a public route and a dashboard page which is a private route as follows: App.js: function App() { return ( <Router> <div className="App">...
Aldor's user avatar
  • 242
0 votes
4 answers
4k views

React js : how to resolve multiple export?

Hello i need to have a multiple export in react js but i have this error Line 84:3: Parsing error: Only one default export allowed per module. this is my code : export default App; export ...
ELMANDPURAMINE's user avatar
1 vote
1 answer
47 views

Circular dependency detected Warning from Angular local project but not on Stackblitz

I have a very simple Angular project on Stackblitz, where I have an authorisations module at page /authorisations containing three children at /pending, /closed and /open respectively. While ...
Michael's user avatar
  • 956
0 votes
1 answer
238 views

Reactjs routes show the loading spinner in all cases

In my small application I have some routes and when I change path appropriate component is loaded. But Issue is - I have loading spinner in my ProductsPage container, I wait for response from db and ...
Hovhannes Gevorgyan's user avatar
1 vote
1 answer
1k views

Angular forward slash in wildcard route

I have a URL like the following and I need to implement route handlers for it: /shop/et--zubehoer-c16/zubehoer-c48/top-cases--taschen-c63/top-case-32l-rosso-passione-p64 That follows the logic: /...
dude's user avatar
  • 5,856
1 vote
0 answers
113 views

Flask routing error using Blueprints in AWS Beanstalk

I'll try to explain my problem the best that I can. I have a Flask app using blueprints with subdomains for redirecting to versions of the same site with different languages. es.my_site -> spanish ...
Francisco Narduzzi's user avatar
0 votes
1 answer
870 views

ASP Net Core Getting route values

I have the following API method in a net core 3.0 application [HttpGet] [Route("Messages/{MessageId}/English")] [Route("Messages/{MessageId}/Danish")] //[Authorize] public ...
Luka's user avatar
  • 67
0 votes
2 answers
2k views

What is reverse routing conceppt in laravel

Please, anyone, explain what is reverse routing with example. I'm searching this question but still confused about this reverse routing concept.
Ghulam Haider's user avatar
0 votes
2 answers
42 views

React router not rendering the correct component

I am having a weird problem with react routing and this might just be something stupid. I a route /products which renders a component. Now I am trying to make another route /products/:id/confirmation-...
bilal aamir's user avatar
0 votes
1 answer
131 views

Angular route with Query Parameter and Appended Route

I am using angular 9 application. I have a routing file with the below code : { path: 'a/:id', component: AComponent }, { path: 'a/b', component: BComponent }, { path: 'a/c', component: CComponent } ...
Suraj Agrawal's user avatar
0 votes
1 answer
289 views

Standalone IIS Server Fails to start web application based on the start up url/ launch url/ default view

We developed an ASP.NET MVC version 5.2.7.0 application using the following technologies: -ASP.NET MVC version 5.2.7.0 -.NET Framework 4.6.1 -Visual Studio 2019 We have to deploy said ...
crazyTech's user avatar
  • 1,407
0 votes
2 answers
352 views

A better way to declare function name based on variable name?

Lets say I have the function bellow: @app.route('/foo', methods=['GET', 'POST']) def foo(): print("food") return "OK" I wanna have multiple functions based on variable name, ...
alm8888's user avatar
2 votes
0 answers
163 views

Angular 9 path routing with SSR express PM2

In the company we have an application made in Angular 9. In local everything works OK. But apart from the application we have an SSR server with node, express and PM2 that receives a post url, ...
Cristian Salcedo's user avatar
0 votes
1 answer
182 views

Laravel - model policy in some routes not working

In a revision work - Laravel 5.8 - I'm facing a strange behavior: app » Policies » CustomerPolicy public function create(User $user ) { dd($user); // for debugging purposes } ... ...
bito_'s user avatar
  • 179
0 votes
2 answers
73 views

(Angular8) Why click event go to routing '/#'?

I wrote this code to use SNS login service. The return callback address from SNS is localhost:4200/account/login. The address is the page on which the current event occurs. The function is declared (...
박진웅's user avatar
0 votes
2 answers
1k views

how to get multi route between two point by routing.openstreetmap.de?

I use openstreetmap api for routing between two points in Android Studio. I want have several suggested routes. I use the following address to send the request https://routing.openstreetmap.de/routed-...
Mehrdad Latifi's user avatar
1 vote
0 answers
207 views

Persist sidebar with fetched data through all the routes

Overview: I got this route in my react application example.com/routeName/:id This is the entrypoint for my users, they click on the link and see a screen with informations provided by this hash in ...
Bruno's user avatar
  • 35
0 votes
1 answer
160 views

Routing and URL Creation - Yii Framework

I have a url in my webapp: https://domain/store/cuisine?category=33 i want to create a route to: https://domain/destiny to https://domain/cuisine?category=33 I added: 'edobhi' => 'store/...
dtostes's user avatar
  • 123
7 votes
3 answers
5k views

Login/Home pages not destroyed when login/logout in Ionic 5 router

My project is in IONIC 5 and Firstore. There are 2 different ion-router-outlet for authenticated (Home) and unauthenticated (Index) routes. Following is the code for dynamically opening the login/home ...
Tapas Mukherjee's user avatar
0 votes
1 answer
773 views

Configure iptables to route to local network and to the internet

I have a linux machine that acts as a router R, subnet B and a host a. I want to create the following forwarding rules: Route everything coming from B to some machine a. From a, return traffic via ...
alnet's user avatar
  • 1,163

1
118 119
120
121 122
669