-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development
: Fix content-type of /.well-known/assetlinks.json
#9648
Development
: Fix content-type of /.well-known/assetlinks.json
#9648
Conversation
…access for google scrapper.
WalkthroughThe changes in this pull request involve modifications to two files. In the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
Client->>Server: GET /assetlinks.json
Server->>Server: Validate androidAppPackage and sha256CertFingerprints
alt Valid
Server-->>Client: 200 OK with AndroidAssetLinksEntry list
else Invalid
Server-->>Client: 404 Not Found
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
src/main/webapp/robots.txt (1)
12-12
: LGTM! Consider adding a comment for clarity.The addition of
Allow: /.well-known/
is correct and necessary for Android App Links verification. This will enable Google's crawler to access the assetlinks.json file while maintaining restrictions on sensitive paths.Consider adding a comment above the Allow directive to document its purpose:
Disallow: /v3/api-docs/ +# Allow Google Digital Asset Links crawler to verify Android App Links Allow: /.well-known/
src/main/java/de/tum/cit/aet/artemis/communication/web/AndroidAppSiteAssociationResource.java (1)
Line range hint
40-46
: Consider enhancing debug logging for troubleshooting.The current debug message could be more informative for troubleshooting deep link issues.
- log.debug("Android Assetlinks information is not configured!"); + log.debug("Android Assetlinks validation failed: package='{}', fingerprint length={}", + androidAppPackage, + sha256CertFingerprints != null ? sha256CertFingerprints.length() : 0);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
src/main/java/de/tum/cit/aet/artemis/communication/web/AndroidAppSiteAssociationResource.java
(1 hunks)src/main/webapp/robots.txt
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/communication/web/AndroidAppSiteAssociationResource.java (1)
Pattern src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
🔇 Additional comments (1)
src/main/java/de/tum/cit/aet/artemis/communication/web/AndroidAppSiteAssociationResource.java (1)
40-40
: LGTM! Correct content-type specification for Digital Asset Links.
The addition of produces = "application/json"
is crucial for proper Android app verification. This ensures the response has the correct Content-Type header, which is required by Google's Digital Asset Links protocol for app-website association verification.
Communication
: Fix content-type of /.well-known/assetlinks.jsonDevelopment
: Fix content-type of /.well-known/assetlinks.json
Checklist
General
Motivation and Context
This is a follow up to #9584, as the problem with deep links in the android app persists.
Description
I fixed the content type and allowed the google scrappers to access the URL.
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Summary by CodeRabbit
New Features
application/json
for improved clarity..well-known
directory in therobots.txt
file.Bug Fixes
robots.txt
remain intact, maintaining proper access restrictions.