0

I wanted to pass query param in hidden format. I mean, not like /register?plan=private but like /register. I should be able to pass plan value as private and can access it easily.

How this is feasible in vuejs please guide. It would be good if we can have codepen example.

// with query, resulting in /register?plan=private
router.push({ path: 'register', query: { plan: 'private' }})
1
  • The only hidden way that hits my mind is to use the store. You can use *$root$ or localStorage ... but anyone with code experience can see it. Commented Feb 26, 2023 at 9:04

1 Answer 1

-1

The query params you want to hide don't look very confidential, so why need to hide the params?

Besides, as far as I understand, you cannot hide the query parameters. Even if you use the post method instead of the get method, you can still see the passed parameters in the network request.

One way to hide (not hide actually) the query params is to encrypt the params to make it a difficult read. Here is an example to do this. Give a read to this article as well.

But again, encryption requires many other things in the box too, and encryption is needed only for confidential data. So, I would suggest figuring out your use case first and deciding why you need to hide the parameters.

Sign up to request clarification or add additional context in comments.

1 Comment

Unfortunately, this is not going to solve the main problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.