Comments (4)
There should be two different validations: it needs to be EITHER a valid language, OR a valid URL endpoint.
For example, domain/en/entity
should, indeed, validate that en
is a valid language. But, domain/entity/adfs89798
should NOT attempt to validate that entity
is a valid language, but a valid endpoint in our application, because we will use that to redirect to your cookie locale or the default language.
We want those links that don't include a language, but yeah, the above should not try to fetch the language "something" and then return the root path.
from uwazi.
We just fixed, in theory, that 200s that were wrongly reported should return 404s. Now they are apparently returning 301s? Maybe it's because it's the first param and it tries to first match the language, then the actual page and something get's "lost" in the middle?
Could this be triggering the default language problem described in #6843?
cc @mfacar
from uwazi.
You're right @RafaPolit, the Path in react-router matches to /:lang, then we are showing the computed index Element for the root route. I couldn't get any other code than 200 even for the reported URL where I'm getting:
Request URL: https://www.girlsrightsplatform.org/SOMETHING Request Method: GET Status Code: 200 OK
An alternative could be to validate the param to be a valid language and if not redirect to a 404 route.
It seems not to be related to #6843
from uwazi.
Here is an example. As you can see it is registered as a 301 for the URL japiquay /wp-login.php
This could also be due to the load balancer redirecting when instances have custom domains (cc @vostorga )
In which case, the 301 would be correct and @mfacar is right and the routes are working correctly. If that is the case, let's close the issue.
{ "request": "GET /wp-login.php HTTP/2.0", "gl2_remote_port": 43552, "body_bytes_sent": 162, "connection_requests": 1, "source": "production-load-balancer", "request_method": "GET", "gl2_source_input": "627e2885c59648618bd0e788", "http_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "remote_addr_city_name": "N/A", "request_time": 0, "host": "japiqay.uwazi.io", "gl2_source_node": "d5014cba-367f-4e7c-af13-ee706c0985f1", "connection": "8644607", "pipe": ".", "gl2_accounted_message_size": 1434, "response_status": 301, "level": 6, "streams": [ "000000000000000000000001", "62875e11c59648618bdae3fa" ], "gl2_message_id": "01HZAPB9R01MYCW17X7JSRT2N3", "http_version": "HTTP/2.0", "message": "GET /wp-login.php HTTP/2.0", "nginx_access": true, "source_ip_reserved_ip": true, "request_length": 239, "facility_num": 23, "_id": "e6bf20e0-2051-11ef-9cd1-00160c474501", "facility": "local7", "nginx_json": "{ \"nginx_timestamp\": \"2024-06-01T20:02:40+00:00\", \"connection\": \"8644607\", \"connection_requests\": 1, \"pipe\": \".\", \"body_bytes_sent\": 162, \"request_length\": 239, \"request_time\": 0.000, \"response_status\": 301, \"request\": \"GET /wp-login.php HTTP/2.0\", \"request_method\": \"GET\", \"host\": \"japiqay.uwazi.io\", \"upstream_cache_status\": \"\", \"upstream_addr\": \"\", \"http_x_forwarded_for\": \"\", \"http_referrer\": \"\", \"http_user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\", \"http_version\": \"HTTP/2.0\", \"remote_user\": \"\", \"http_x_forwarded_proto\": \"\", \"upstream_response_time\": \"\", \"nginx_access\": true }" }
from uwazi.
Related Issues (20)
- [IX] Move "Accuracy" and "Pending" from filters to the indicator they actually refer to HOT 1
- [IX] Concurrent clicks on accept results in missing actions HOT 1
- Blinking 404 on wrong page HOT 1
- user property missing, what does it mean and shall we do something about it? HOT 2
- [IX] Context per value instead of context per suggestion
- [IX] - Statuses revamp HOT 2
- [IX]: 'Selected' values cannot be viewed in the Open PDF menu (extractor for Select) when clicked the second time
- Tenant's watch is loading in memory ALL data from tenants
- Failing component test HOT 1
- Tests that use the UWAZI_SHARED_DB can be prone to race conditions
- Tenant feature flags should be part of Tenants DB
- api/public endpoint uses entities.save which can be used to update entities
- Tenants watch triggers update of all tenants on a single tenant update
- Download file with original name
- Review dependabot strategy HOT 1
- [IX] - "Select & search" suggestions improvements HOT 1
- Website HOT 1
- Create a "testing" branch github workflow that creates a testing release
- [IX] - Table tooltip is rendered in the wrong z-index
- [IX] Click to fill on text properties, issues with new line chars HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uwazi.